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

Market Replay = Editing Multi Series Strategy = Multi day replay = FAIL

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

    Market Replay = Editing Multi Series Strategy = Multi day replay = FAIL

    Things are not resetting correctly to any sort of baseline.

    I was fine for a while when testing 1 day in market replay, but when I change the test to multiple days to see how things play out.. === FAILURE at some point.

    latest NT7.xxxxxx.3, windows vista x32 laptop..

    Basically, I'm chugging along, editing, retesting, hammering away at market replay, testing and retesting code, and then BAM..multi series strategy on ES 03-11 chart.

    I get slammed with OnBarUpdate failure error.. you are accessing invalid bars error.. which is total bull. it's 9:55am and Closes[TRIN][1] is not an error on a 3 minute chart.

    restart ninja trader..and the code works, since the timeline is working again.

    I'm working under basic assumptions that this stuff should work when :
    1) If I restart my replay timeline, the strategy resets. I see that confirmation in the output window.
    2) If I 'continue the timeline', I uncheck and recheck the strategy in the command center. That shows the reset in the output window, and my new print statements are engaged.




    Code:
        if (Historical) return;
        
        if (BarsInProgress != 0 ) return;
        
        
        if (    ToTime(Time[0]) >= ToTime( 9, 30, 00)
            &&  ToTime(Time[0]) <= ToTime( 15, 57, 00))
    This code was firing BEFORE 9:30 on the replay, since Time[0] was AFTER 9:30.. which makes NO sense.

    been hacking away at this for 6 hours.. time for bed..

    #2
    sledge, can you please clarify what is happening? What are the steps to reproduce this behavior?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Austin View Post
      sledge, can you please clarify what is happening? What are the steps to reproduce this behavior?
      No official steps yet.

      I just keep editing my strategy, compiling it, restarting it, running through market replay..

      then I expand to several days on market replay to test a weeks worth of trades (I record 24x7)... and started getting those OnBarUpdate errors from invalid time bars.

      Maybe 2-3 hours worth of hacking around before it 'broke', until I restarted NT.

      That's going to be difficult to reproduce.

      Comment


        #4
        sledge, that will indeed be difficult to reproduce but I will keep an eye out. Let us know if you discover the key steps.
        AustinNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Austin View Post
          sledge, that will indeed be difficult to reproduce but I will keep an eye out. Let us know if you discover the key steps.

          Ok - looks like it is a slight issue on my end.

          Monday - I didn't get data on TRIN.

          So I started market replay on Tuesday.. the charts were set to 3 day look back, and therefore failing with start on Tuesday.

          I changed the charts to 5 day look back, and it works.

          But.. I doesn't recognize the 2/22 date until 2/23. For all of 2/22 it uses close of 2/18.

          Starting market replay with 2/23, it work. (and shows data for 2/22.. it's just that missing 2/21 data is also detrimental to 2/22 since the chart doesn't update the end date).

          Comment


            #6
            If you try to play just 2/22 does that work? It does seem like you've identified a slight issue with the way Market Replay handles missing data.
            AustinNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            53 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            32 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            4 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            19 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            6 views
            0 likes
            Last Post cre8able  
            Working...
            X