Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.



    JimNinjaTrader Customer Service

    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.

        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,404 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        95 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        7 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        159 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Yesterday, 09:29 PM
        0 responses
        8 views
        0 likes
        Last Post Belfortbucks  
        Working...
        X