Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

replay bar data is missing causing errors in playback replay

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

    replay bar data is missing causing errors in playback replay

    Hi, I use replay data tick by tick downloaded from my Ninja trader account.
    I noticed that during playback replay/simulation, I often get an error (see image 1).
    Looking at the data, couple bars are missing (see image 2). It is hard to tell but the bars are on 9:25 & 9:35 am.
    9:30 bar is missing.
    And of course the script is failing right there (see image 3)
    If I reload historical data, I can see the bar at 9:30.
    I restart the replay and still failing at the same place: bar is missing.
    What could I do to fix that?
    This is happening quite often with different instruments and really preventing me from having good playback replays.
    Each time a bar is missing.
    Thanks

    #2
    Hi pba66, thanks for writing in.

    Is it possible for your to re-download the data you are trying to use? This would be the best solution. There would be no way to add in data that is missing from the data that you currently have which could be corrupted in some way. Please let me know the data series (chart) settings you are using and the instrument and time frame of data you are using so I can test it on my installation.

    Kind regards.
    -ChrisL
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      One more question: I was testing if a bar is missing and added a: Debug.Assert(Time[1].Minute == (Time[0].AddMinutes(-5.0)).Minute, string.Format("IsFirstTickOfBar: Missing Bar(s) Time[1]:{0} Time[0]:{1}",Time[1].Minute, Time[0].Minute));

      I actually see they are different but I notice Debug.Assert does nothing. Do I need to do something to enable Debug.Assert?
      Thanks.
      Last edited by pba66; 03-26-2022, 06:17 PM.

      Comment


        #4
        HI pba66, right click the code editor and enable "Debug Mode" then compile again and Debug.Assert will work after that.

        Kind regards,
        -ChrisL
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by RideMe, 04-07-2024, 04:54 PM
        5 responses
        28 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by f.saeidi, Today, 08:13 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by DavidHP, Today, 07:56 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by kujista, Today, 06:23 AM
        3 responses
        10 views
        0 likes
        Last Post kujista
        by kujista
         
        Started by Mindset, Yesterday, 02:04 AM
        2 responses
        18 views
        0 likes
        Last Post NinjaTrader_RyanS  
        Working...
        X