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 argusthome, 03-08-2026, 10:06 AM
          0 responses
          113 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          60 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          40 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          43 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          81 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X