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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      132 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      118 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X