I looked into the trace file and found that the request is discarded:
(contract total for the stop was 28, request to change to 32)
2018-03-18 00:28:49:917 (Simulated Data Feed) Cbi.Globals.ProcessEventArgsInThreadContext.Discar dRetryChange: Order='fce76efd445d4a24ac63f80ddbaa68e8/Sim101' Name='SS1A-15-2-ShortAutoDynStpLimEntryLive' State=PendingChange Instrument='ES 12-17' Action=Buy Limit price=0 Stop price=2689 Quantity=32 Strategy='a_Strat_CADI_CCTI_SMEI_Abstract_Test01' Type=Stop Tif=Gtc Oco='3de80fa4a87e40098459065872a06c45' Filled=0 Fill price=0 Token='fce76efd445d4a24ac63f80ddbaa68e8' Gtd='2099-12-01 00:00:00'
and we're back to 28 contracts:
2018-03-18 00:28:49:917 (Simulated Data Feed) Cbi.OrderStatusEventArgs.Process: Order='fce76efd445d4a24ac63f80ddbaa68e8/Sim101' Name='SS1A-15-2-ShortAutoDynStpLimEntryLive' New state=PendingChange Instrument='ES 12-17' Action=Buy Limit price=0 Stop price=2689 Quantity=28 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
2018-03-18 00:28:50:526 (Simulated Data Feed) Cbi.Connection.ProcessEventArgs.OrderStatusEventAr gs: Order='fce76efd445d4a24ac63f80ddbaa68e8/Sim101' Name='SS1A-15-2-ShortAutoDynStpLimEntryLive' New state=Accepted Instrument='ES 12-17' Action=Buy Limit price=0 Stop price=2689 Quantity=28 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
2018-03-18 00:28:50:526 (Simulated Data Feed) Cbi.Order.Update1: oldid='fce76efd445d4a24ac63f80ddbaa68e8' Order='fce76efd445d4a24ac63f80ddbaa68e8/Sim101' Name='SS1A-15-2-ShortAutoDynStpLimEntryLive' New state=Accepted Instrument='ES 12-17' Action=Buy Limit price=0 Stop price=2689 Quantity=28 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
2018-03-18 00:28:50:526 (Simulated Data Feed) Cbi.OrderStatusEventArgs.Process: Order='fce76efd445d4a24ac63f80ddbaa68e8/Sim101' Name='SS1A-15-2-ShortAutoDynStpLimEntryLive' New state=Accepted Instrument='ES 12-17' Action=Buy Limit price=0 Stop price=2689 Quantity=28 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''
My question is how do I catch this?? Why does this occur within NT? There is no error.
All I know from my code is that a request was sent and I didn't receive an updated quantity for the order when OnOrderUpdate fires. You can see it stays at its previous value of 28.
I don't really want to open the trace file via code to search for the order and find the DiscardRetryChange entry. This is a rough and not a very clean solution.
Is there a way to read the same information contained in the trace file regarding the order requests? Cbi.Globals.ProcessEventArgsInThreadContext.Discar dRetryChange? If I could access this it would help.
Is there a way to access the eventArgs that go along with the OnOrderUpdate event? I can't imagine these are null.
Right now all I know is that a request was sent and we get nothing back to confirm or deny the action has occurred, and the OCO contracts do not match the entry. I could create a class with a list and a timer, record all of my requests internally and if an update doesn't show up through OnOrderUpdate in a reasonable time, resend the request, but it would be nice if I could check NT's various eventArgs or results of failed operations for clues as to what may have happened. This way I wouldn't be guessing and blindly resending the request.
Since I can't see under the hood of NT, any guidance you can offer would be appreciated.
Thanks.
Comment