Order='81b7d8ec4247479493d970e3a53667f9/Sim101' Name='buyMarketStop 2' New state='Cancel submitted' Instrument='MYM 03-25' Action='Sell' Limit price=0 Stop price=43704 Quantity=2 Type='Stop Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''
There is nothing in the output as to why it was cancelled. Nothing under TraceOrders. Not sure why this would pop up?
The output shows it working as intended...
stopOrder assigned
stopOrder: orderId='81b7d8ec4247479493d970e3a53667f9' account='Sim101' name='buyMarketStop 2' orderState=Submitted instrument='MYM 03-25' orderAction=Sell orderType='Stop Market' limitPrice=0 stopPrice=43704 quantity=2 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=27236 time='2025-02-27 12:26:49' gtd='2099-12-01' statementDate='2025-02-27'
targetOrder assigned
targetOrder: orderId='2a4e1b49fdf648918098a6b3c8d97023' account='Sim101' name='TargetLimit 2' orderState=Submitted instrument='MYM 03-25' orderAction=Sell orderType='Limit' limitPrice=43758 stopPrice=0 quantity=2 tif=Gtc oco='' filled=0 averageFillPrice=0 onBehalfOf='' id=27237 time='2025-02-27 12:26:49' gtd='2099-12-01' statementDate='2025-02-27'
I have a dictionaries that hold the stopOrders and targetOrders, and those have been "updated" but of course did not realize that these orders were somehow cancelled.
Any ideas of where to look or add prints to figure out as to why this is happening?
The other issue that I have found out, for the times where the first SL and TP disappear, it seems that entryOrder gets assigned, and sometime in between also working on the second entry, the variable entryOrder somehow goes null. I don't see any reason why this should happen. I have Prints that should be triggering anytime it would be setting it to null, so it's not because of that. It's not setting my SL or TP because the entryOrder is not matching. So I have found the why it's happening, but there is also another why I need to solve.
