- ago
I have an options trading strategy that uses daily data and is set to run in the SM at 10:30 market time each day.

It ran successfully today and generated 4 signals, which were placed as option trades with the broker (Tradier). Then at 13:39 (market time, 10:39 local), it ran again (it's only supposed to run once a day) and signaled two more trades for the underlying of the options that were still in Active state (limit price not hit).

I don't understand how the following happened:
1. It ran again in the SM, 3 hours after first signals, even though it is a daily strategy. The SM shows it is scheduled to run on Monday, not today (Friday).
2. I don't know how it attempted to trade the underlying, although it is in my dataset
3. The Order Manager shows no DataSet for these rogue trades

It does not appear that these orders were actually sent to the broker, despite the fact their status is "Active." I restarted WL before market open but not after that.




0
373
Solved
11 Replies

Reply

Bookmark

Sort
Cone8
 ( 5.88% )
- ago
#1
"SMAK Trader dev2" had run (last at 10:40) and you're also viewing that Order Block. I can only assume those underlying orders are from that strategy.

You can tell for sure if you deselect the "eye" button from all of the Order blocks except SMAK Trader. dev2.
0
- ago
#2
No, those orders are from the "unmapped" Signal Block that I expanded in the screen shot. SMAK Trader uses QQQ symbol only and the reason it stopped at 10:40 is I inadvertently deactivated it.
0
Cone8
 ( 5.88% )
- ago
#3
QUOTE:
these orders were actually sent to the broker, despite the fact their status is "Active."
Ok, I think I see where this happens, but we'll have to figure out the scenario why it happens. While processing the Active Orders from the broker, those [option] orders couldn't be matched to orders already in a Signal Block, so they're just assigned to an Unmapped block.

It's probably too late now, but it would be good to know if there were any Tradier events in the Log Viewer around that time... like a broker/accounts reconnection.
0
Cone8
 ( 5.88% )
- ago
#4
I see where the problem is. When we retrieve the active orders (a reconnection probably occurred) Tradier doesn't send the option symbol for active orders in the "symbol" field! There's another place for that. We'll adapt to that in Tradier build 32.
0
Best Answer
- ago
#5
@Cone
I got this disconnect log error today

QUOTE:
9/16/2024 10:00:42:996
Tradier
10:00:42.996 Tradier Broker socket disconnected: Lost; Reconnecting...
--------
9/16/2024 10:00:43:119
Tradier
Streaming Disconnected - attempting Reconnect: Lost, CloseStatus: , SessionId: 3d1875e2-bd97-4a56-8fe5-ff756ff9ebeb
--------
9/16/2024 10:00:44:693
Tradier
Tradier Streaming Reconnected after Lost on sessionID: 3d1875e2-bd97-4a56-8fe5-ff756ff9ebeb
--------
9/16/2024 10:00:45:550
Tradier
Streaming Reconnect Successful
--------
9/16/2024 10:00:45:790
Tradier
Tradier Streaming Reconnected after Lost on sessionID: 3d1875e2-bd97-4a56-8fe5-ff756ff9ebeb
--------
9/16/2024 10:00:46:732
Tradier
10:00:46.732 Tradier Broker socket disconnected: ByUser; Reconnecting...
--------
9/16/2024 10:00:47:116
Tradier
user/profile Get empty
--------
9/16/2024 10:00:47:116
Tradier
10:00:47.116 Initiating Tradier accounts socket...
--------
9/16/2024 10:00:47:358
Tradier
10:00:47.358 Tradier Connected on sessionID: dab4c8da-4624-4728-a8f7-74c31a460221


Upon reconnecting, it placed orders with Order Manager for positions that were already Active but had not hit their limit price. These orders were *not* sent to the live broker.

QUOTE:
Buy 12 HYG241018C00079000 Limit 0.8 Active 0 0 9/16/2024 10:00:47 unmapped, Unmapped, Daily, Tradier, [acct num], US Stocks [acct num]
Buy 4 TLT241018C00099000 Limit 2.7 Active 0 0 9/16/2024 10:00:47 unmapped, Unmapped, Daily, Tradier, [acct num], US Stocks [acct num]


Would you expect these orders to be placed again on reconnect if they were already currently Active? I am using B32.
0
Cone8
 ( 5.88% )
- ago
#6
Of course not. When you connect, we request the active orders at the broker and display them in an order block where you can interact with them.
0
- ago
#7
So, the operative word is "displayed" not "placed" and it is working as expected. Thanks.
0
Cone8
 ( 5.88% )
- ago
#8
To be clear, these are "unmapped" orders working at the broker. That is, they are not attached to a Strategy even if they were created by a Strategy in another WL session.

So, if you're running a Strategy, it can certainly "recreate" orders and place them as new orders - and then you'll have duplicates.
0
- ago
#9
0
Cone8
 ( 5.88% )
- ago
#10
Which build (Tradier)?
And what, if anything, were you doing?
And now we're off topic.
0
- ago
#11
Discussion moved here
0

Reply

Bookmark

Sort