Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

RC1 Multi-timeframe historical playback out of order

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

    RC1 Multi-timeframe historical playback out of order

    I was writing a simple multi-timeframe indicator which works fine in real time. However, when historical data is reloaded, everything would shift back one bar. The issue seems to be the order of the OnBarUpdate events. For example, if the main bar is a 1-min and the second series is 1-sec, you can get playback like

    BarsInProgress 1 Time 13:54:57 <- part of 13:55 1-min bar
    BarsInProgress 1 Time 13:54:58
    BarsInProgress 1 Time 13:54:59
    BarsInProgress 0 Time 13:55:00 <- main bar adds 13:55 bar
    BarsInProgress 1 Time 13:55:00 <- part of 13:56 1-min bar
    BarsInProgress 1 Time 13:55:01
    BarsInProgress 1 Time 13:55:02

    The issue is that the main bar update arrives after the lower time frame ticks, and so the main bar dataseries has not added a new entry yet, and the indicator is updating the previous bar.

    The main bar needs to be played back when it starts, not when it ends.

    #2
    Sounds like this one?

    Comment


      #3
      There was a bug resolved in terms of how data is processed in real-time, however your results are unrelated to the bug fix.

      What you are reporting is currently expected due to the way multi-series bars are processed historically as detailed here:


      If you require the bars to process in the same sequence between real-time and historical, enabling TickReplay should resolve this scenario for you. However, do keep us posted if you see anything you would find unexpected with that setup.
      MatthewNinjaTrader Product Management

      Comment


        #4
        That was the answer I expected, but unfortunately it means that NT continues to be fatally flawed for these types of indicators. The fix would be to play back the bars using the start timestamp (or the end of the previous bar + a small increment since you do not have the start timestamp). In the RC1 timeframe, I would not expect this to change, but it was worth a try.

        Comment


          #5
          Originally posted by aslane View Post
          That was the answer I expected, but unfortunately it means that NT continues to be fatally flawed for these types of indicators. The fix would be to play back the bars using the start timestamp (or the end of the previous bar + a small increment since you do not have the start timestamp). In the RC1 timeframe, I would not expect this to change, but it was worth a try.
          To be clear, did you try tick replay and still observe issues? We have made some enhancements to help address these sorts of scenarios under that data processing model.
          MatthewNinjaTrader Product Management

          Comment


            #6
            No, I am sure that would work, but I do not really want to record all of my data for tick replay just to get a trivial indicator to work.

            I have already addressed it by queueing the out of order data and playing it back in the correct order internally to the indicator. Works perfectly, would have been nice if the platform just worked.

            Comment


              #7
              Tick replay does not need to be recorded, it is replayed from provider events. There is nothing you have to do but enable the option. But glad to hear you found another solution.
              MatthewNinjaTrader Product Management

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by RookieTrader, Today, 09:37 AM
              0 responses
              1 view
              0 likes
              Last Post RookieTrader  
              Started by KennyK, 05-29-2017, 02:02 AM
              3 responses
              1,282 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by AttiM, 02-14-2024, 05:20 PM
              11 responses
              184 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by fernandobr, Today, 09:11 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by timmbbo, Today, 08:59 AM
              1 response
              3 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X