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 Mindset, 04-21-2026, 06:46 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          144 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          71 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by cmoran13, 04-16-2026, 01:02 PM
          0 responses
          125 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          79 views
          0 likes
          Last Post PaulMohn  
          Working...
          X