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 kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      58 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      41 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      46 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      37 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      156 views
      0 likes
      Last Post SalmaTrader  
      Working...
      X