Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using OnExecution() to send market order directly after stop order fills

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

    #16
    Hello nmk85roll,

    That was the behavior I was seeing with my earlier tests.

    The correct way to handle the second order submission intra bar would be to submit orders to a single tick data series, and the 2nd market order would trigger on the tick that fills the order.

    However, it is convenient that you see the 2nd entry on the same bar, and gives you an intended result without adding the intrabar granularity. You are welcome to do that with backtesting if it is convenient for you, but I would not suggest it as a regular way to write a strategy.



    Comment


      #17
      But do we know why the "OrderType.Stop" would get processed on the same bar, but the "OrderType.Market" would not? I don't understand how NT7 is processing those orders differently.

      Comment


        #18
        Hello nmk85roll,

        I wouldn't put too much thought behind it. I do not expect to see a Stop order submitted after the first Stop order is executed to fill on the same bar. NinjaTrader 7 is frozen from active development, so this wouldn't be something we would chase as a bug.

        Submitting a market order second and to a single tick data series would be advised for "correctness" but you are welcome to backtest this way if you find it "convenient" to do so.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X