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 cmoran13, Yesterday, 01:02 PM
          0 responses
          31 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          22 views
          0 likes
          Last Post PaulMohn  
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          160 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          95 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          148 views
          2 likes
          Last Post CaptainJack  
          Working...
          X