Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

order filling price (backtest)

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

    order filling price (backtest)

    Hi, I've noticed the following peculiar behavior of NT in backtesting: when I submit an order at bar close (CalculateOnBarClose=true), on the chart and in calculations it appears that the order got filled at... next bar's open. It may make a lot of difference if there's a gap between the bars. Is there a way to fix that?

    #2
    billitin, I'm not sure I follow you, yes in backtesting this is expected as the next logical trade location is the next bar's open after the conditions evaluated to true to trigger the trade placement.

    Comment


      #3
      I'd be fine with it, except that I specify Close[0] as entry price, and instead of that in effect I get Open[next_bar] price which is algorithmically (rather than maybe logically) incorrect...

      Comment


        #4
        Hello,

        I am jumping in here, but maybe you could give us details on the prices, bars and when the conditions are met and we can help you more.

        Post some code as well.
        DenNinjaTrader Customer Service

        Comment


          #5
          Never mind, I've just found that EnterLongLimit doesn't have the noted problem, unlike EnterLong. Thanks!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          366 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          237 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          205 views
          1 like
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          290 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          250 views
          0 likes
          Last Post CarlTrading  
          Working...
          X