Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Buy to cover short happens twice causing strategy to go long

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

    Buy to cover short happens twice causing strategy to go long

    Hello,

    My strategy when exiting using a buy to cover, for some reason creates a buy to cover twice.

    For example, if i'm short 3 contracts, and these two messages occur, the first order would flatten the short.

    But for some reason this 2nd buy to cover is placed.

    My initial question is, if here is nothing to cover (as my position is flat), would that 2nd buy to cover get rejected or create a long position. Thank you!

    Order 1:
    Order='152544832881/TAKEPROFIT1461800' Name='Buy to cover' New state='Submitted' Instrument='MGC 02-25' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=3 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''

    Order 2:
    ​Order='152544832866/TAKEPROFIT1461800' Name='Buy to cover' New state='Submitted' Instrument='MGC 02-25' Action='Buy to cover' Limit price=0 Stop price=0 Quantity=3 Type='Market' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='No error' Native error=''


    #2
    Hello farawayz,

    That second order if filled after the position was flat would enter the long position.

    I would recommend adding debugging prints and enabling trace orders to the code to see where the second order is generating from.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you Chelsea

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Working...
      X