Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting Error on calling EventHandlerBarsUpdate

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

    Getting Error on calling EventHandlerBarsUpdate

    Hi,

    I'm running live strategies (Calculate=OnPriceChange), NT8.0.0.9,
    I'm seeing the trace file is sometimes filled with:

    Strategy <myStrategy>'': Error on calling 'EventHandlerBarsUpdate' method: Index was outside the bounds of the array.

    I never get those on my backtests.
    what is the reason for that?
    I don't see any other details in the trace/log files + no exception is being caught by my strategy code.

    #2
    Originally posted by liorsham View Post
    Hi,

    I'm running live strategies (Calculate=OnPriceChange), NT8.0.0.9,
    I'm seeing the trace file is sometimes filled with:

    Strategy <myStrategy>'': Error on calling 'EventHandlerBarsUpdate' method: Index was outside the bounds of the array.

    I never get those on my backtests.
    what is the reason for that?
    I don't see any other details in the trace/log files + no exception is being caught by my strategy code.
    The error you mention is only caught during real-time updates, and would appear based on the exception to be related to multi-series scripts using OnBarUpdate().

    So we can help isolate this error, can you please elaborate a little more on what your strategy is doing? Is it adding additional data through AddDataSeries()? If so, what time frames or instruments are being added, in addition to the primary?
    MatthewNinjaTrader Product Management

    Comment


      #3
      That's correct - I'm calling AddDataSeries 4 times from OnStateChange (State=State.Configure), it's called for x1,..,x4 minutes intervals, some of the data series are equal sometimes (e.g. x2=x3=x4), then I'm doing several calculations on their previous bars (e.g. SMA).
      I'm not adding any other instruments.

      Comment


        #4
        Hello liorsham,

        Please send the relevant log and trace files in for review to Platformsupport[at]Ninjatrader[dot]com. In the subject line please add atten:Paul and a link to this thread.

        Thank-you.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Matthew View Post
          The error you mention is only caught during real-time updates, and would appear based on the exception to be related to multi-series scripts using OnBarUpdate().

          So we can help isolate this error, can you please elaborate a little more on what your strategy is doing? Is it adding additional data through AddDataSeries()? If so, what time frames or instruments are being added, in addition to the primary?
          I get it in playback market replay with added series.

          Comment


            #6
            Was it resolved? I am getting the same error.

            Comment


              #7
              Hello amiteshmani,

              Thanks for your post and welcome to the forums.

              Error messages can be generated for any number of reasons. To assist, please send your log and trace files in along with any description of what and when the error occurs. Please send to PlatformSupport[at]Ninjatrader[dot]Com Atten:Paul and a link to this thread.

              Your log files would be found in Documents>NinjaTrader8>Logs
              Your trace files would be found in Documents>NinjaTrader8>trace

              Please do not post these files in a public forum because they contain your sensitive information.
              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by love2code2trade, 04-17-2024, 01:45 PM
              4 responses
              36 views
              0 likes
              Last Post love2code2trade  
              Started by alifarahani, Today, 09:40 AM
              2 responses
              13 views
              0 likes
              Last Post alifarahani  
              Started by junkone, Today, 11:37 AM
              3 responses
              15 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by pickmyonlineclass, Today, 12:23 PM
              0 responses
              1 view
              0 likes
              Last Post pickmyonlineclass  
              Started by frankthearm, Yesterday, 09:08 AM
              12 responses
              44 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Working...
              X