Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

[BUG} Stop Market order not executed with gaps

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

    [BUG} Stop Market order not executed with gaps

    I suspect this is a bug. Using Playback connection. Historical and playing it. My Strategy runs On Bar Close, not on every tick or tick change.
    I place EnterLongStopMarket orders at the high of the current bar but the following bar has an unfilled gap so the stop order price never gets touched by the following bar. I would expect the order to get executed and instead is completely skipped. Does this happen in real life? I think not, so I believe this is a bug. I am attaching a picture to show the behavior. The order at bar 161 should get executed at bar 162 but it is not.
    The code at bar 162 is
    if (Position.MarketPosition == MarketPosition.Flat {
    EnterLongStopMarket(1, High[0], "LSM"); // i.e. EnterLongStopMarket(1, 20214.5, "LSM").
    }
    I debugged it and the position is Flat and the values are correct.
    Best
    Gio Click image for larger version  Name:	Long Stop Order Fails.jpg Views:	0 Size:	44.6 KB ID:	1325046
    Last edited by giogio1; 11-19-2024, 02:31 AM.

    #2
    Hello giogio1,

    That would be due to the price never being met during the calculation of the fill, that would be expected in this case because that is all the data that is available for processing. In a real exchange that may fill but on sim that would not be able to be filled if the price range never met the order price during fill processing.

    Comment


      #3
      Then it is a bug by design, unless NinjaTrader believes that simulation should not attempt to match reality by design. Is that the case? can it be submitted for correction?
      Thank you Jesse
      Gio

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      58 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      133 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X