Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8Beta-all(including 9) -PB-MR Random Index errors & "EventHandlerBarsUpdate"

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

    NT8Beta-all(including 9) -PB-MR Random Index errors & "EventHandlerBarsUpdate"

    nt8b9 - playback-market replay

    Anyone else having issues with indicators throwing "Error on calling 'OnBarUpdate' method on bar 7185 : You are accessing an index with a value that is invalid since it is out-of-range. IE accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."

    The odd thing is - this indicator has run at least several hundred times before with this error happening randomly...

    I'm guessing the strategy disabled because of this, but that error was "Error on calling 'EventHandlerBarsUpdate' method: Object not set to an instance of an object."

    No - this isn't anything I can reproduce with certainty...

    Maybe someone else is also seeing this, but I doubt it.

    Never saw it in NT7, although I never had this many runs.

    #2
    It looks like Windows Defender hasn't been excluded on this machine and may have been the cause.

    The other instance of indicator did properly run in the chart without issue.

    I'll exclude the files and folders for NT8 and will monitor this machine also.

    Comment


      #3
      OK - it happened again with Windows Defender excluding all relevant folders and NT8 app itself.

      This time on a different contract, ES09-15, instead of ES12-15.

      Error on calling 'OnBarUpdate' method on bar 5564: You are accessing an index with a value that is invalid since it is out-of-range. IE accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart."

      Then strategy disabled with EventHandlerBarsUpdate error.

      The indicator in my chart was once again fine.

      It happened at the beginning of the contract.

      That's 2 runs in a row with this failure.

      This is on NT8B9 64 bit windows 7.. haven't seen it with NT8B9 on windows 10.

      I'm pretty sure I rebooted before I restarted. I'll reboot just in case and see what happens.

      Comment


        #4
        Hello sledge,

        Thank you for your patience.

        I am unable to reproduce this behavior on my end, using a 64-bit Windows 7 machine. I will continue to test to see if I can reproduce.
        Shawn B.NinjaTrader Customer Service

        Comment


          #5
          Even though I didn't get locking errors, I added the lock thing mentioned in release 9 notes (during contract switch over, I have 2 chart indicators, and 2 strategies accessing the same file).

          This didn't help any, as the new contract switchover failed with the index error, and terminated.

          I'll try to put on some debugging to catch the issue, but might significantly change order of events. Happens on different contracts. Never the same.

          Tried running switchover week 5 times in a row and they all worked.

          Comment


            #6
            Doing this "locking" has added over 3 hours to replay. (5 to 8 hours).. CPU usage is almost double.. (30% to 60%)...

            So this "lock" thing is definitely locking... but not necessary in my case...

            Comment


              #7
              Has anyone resolved this issue? I'm experiencing the same out-of-range...a value of 5 when ther are only 4 bars on the chart error

              Comment


                #8
                Hello sledge,

                Is it consistently the same indicator or indicators? I wish to try to recreate this and am wondering if there is anything specific in the code that I may need to try.

                Comment


                  #9
                  Hello MadScientist,

                  Thank you for your post.

                  Are you performing a check of all the bars loaded before accessing them? For example, if I needed a 20 bar period in my script I would use the following at the beginning of the OnBarUpdate():
                  Code:
                  if (CurrentBar <= 20)
                  return;

                  Comment


                    #10
                    Originally posted by NinjaTrader_PatrickH View Post
                    Hello sledge,

                    Is it consistently the same indicator or indicators? I wish to try to recreate this and am wondering if there is anything specific in the code that I may need to try.
                    Patrick,

                    From what I see, when a new contract starts in playback-mr, those historical days of data from January 20,2014 are getting loaded in. That's how I'm a bar 7,000+ on a new contract stay. The error is random. Doesn't always happen. I'm not accessing bars 7000+ ago. Only the current one and only after market open, so I should always have bars. This was reported in another thread here. When starting a contract, is loading in data from before jan 20 2014 on all my es contracts. That's es06-14,through es06-16.


                    I'll try to force the issue by using more of they indicator and see if I can get it to always happen.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by bmartz, 03-12-2024, 06:12 AM
                    5 responses
                    32 views
                    0 likes
                    Last Post NinjaTrader_Zachary  
                    Started by Aviram Y, Today, 05:29 AM
                    4 responses
                    13 views
                    0 likes
                    Last Post Aviram Y  
                    Started by algospoke, 04-17-2024, 06:40 PM
                    3 responses
                    28 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by gentlebenthebear, Today, 01:30 AM
                    1 response
                    8 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by cls71, Today, 04:45 AM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Working...
                    X