Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry always 1 bar late

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

    #16
    Originally posted by NinjaTrader_Bertrand View Post
    tjendra, in backtesting this is expected as working with multiple BarsInProgress or not does matter.

    Consider having only one BarsInProgress > you submit the order at 1:25, it fills at 1:30.

    As you submit across multiple BarsInProgress it takes an extra step in between to submit from one to another, on 1:25 you submit it from BarsInProgress 1 to BarsInProgess 0, this actually happen on the 1:30 bar so it gets filled on the 1:35 one as you reported.
    But the entry was submitted for execution on the primary bar on 1:25pm as shown by trace orders. You mean the primary bar won't get that order until the end of its 1:30pm bar? Therefore it executes on the open of the 1:35pm bar? If it was live and not during backtesting, would the order be entered on the open of the 1:30pm bar then?

    Comment


      #17
      Correct - in realtime the order is submitted the moment it's called by the BarsInProgess.

      Comment


        #18
        Originally posted by NinjaTrader_Bertrand View Post
        Correct - in realtime the order is submitted the moment it's called by the BarsInProgess.
        You were saying the lag was because the signal checking was done on the secondary bar (i.e. BarInProgress==1), and the order was for the primary bar (i.e. BarInProgress==0) since BarInProgress==0 will be executed before BarInProgress==1 is executed.

        If I change the logic of my strategy so that the signal checking was done on the primary bar (i.e. BarInProgress==0), and the order was for the secondary bar (i.e. BarInProgress==1). Since BarInProgress==0 will be executed before BarInProgress==1 is executed, would the order then be execute without the 1 bar lag?

        Comment


          #19
          This would not make a difference either tjendra - to achieve an earlier fill in backtesting you would need to add a finer series still as in this sample - http://www.ninjatrader-support2.com/...ead.php?t=6652

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          649 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          576 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X