Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Log is showing Cancel Submitted

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Log is showing Cancel Submitted

    Ok. Every so often I am finding that my strategy is attempting to enter a position that is split into 2 parts. My entry orders seem to be filled but there are times where my Stop and TP are fully filled, other times I am only seeing the 2nd one one the screen, so the entry is, for example 7 positions, but the SL and TP are only a quantity of 2. Other times I only see the entries, and there are not SL and TP at all. I am adding more prints and in the process of figuring that out, but I came across something in the log that puzzles me.

    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.
    Last edited by rockmanx00; 02-27-2025, 12:14 PM.

Latest Posts

Collapse

Topics Statistics Last Post
Started by NullPointStrategies, Today, 05:17 AM
0 responses
30 views
0 likes
Last Post NullPointStrategies  
Started by argusthome, 03-08-2026, 10:06 AM
0 responses
124 views
0 likes
Last Post argusthome  
Started by NabilKhattabi, 03-06-2026, 11:18 AM
0 responses
64 views
0 likes
Last Post NabilKhattabi  
Started by Deep42, 03-06-2026, 12:28 AM
0 responses
41 views
0 likes
Last Post Deep42
by Deep42
 
Started by TheRealMorford, 03-05-2026, 06:15 PM
0 responses
46 views
0 likes
Last Post TheRealMorford  
Working...
X