Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on calling OnBarUpdate

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

    Error on calling OnBarUpdate

    Hello, when doing backtest a strategy, I get the following error:

    Error on calling 'OnBarUpdate' method for indicator 'paskbid' on bar 2: You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

    But this error only occurs when you use a template session different than the default, use instrument settings.

    Why does this happen?

    The indicator used in the strategy uses data from ticks, bid and ask.
    If I insert the indicator directly on the chart looks good and there is no error.

    The instrument is the Mini-Russell.

    Thanks
    Last edited by juanfer; 03-24-2011, 04:01 AM.

    #2
    juanfer, please first of all ensure that you have proper CurrentBars checks for all series in place - http://www.ninjatrader.com/support/h...urrentbars.htm

    Would the issue then still come up?

    Thanks,
    BertrandNinjaTrader Customer Service

    Comment


      #3
      The system uses only one series.
      While the indicator gives the signals in this strategy if it is based on several series.
      It can be for this?
      But then always fail, is not it?
      and not only when I use a custom session template?

      Comment


        #4
        I'm sorry, I do not fully follow you - so you call a MultiSeries indicator in your single series strategy? Does the indicator then have all the needed CurrentBar(s) checks?

        Thanks,
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rtwave, 04-12-2024, 09:30 AM
        4 responses
        30 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        29 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by bmartz, 03-12-2024, 06:12 AM
        2 responses
        22 views
        0 likes
        Last Post bmartz
        by bmartz
         
        Started by funk10101, Today, 12:02 AM
        0 responses
        6 views
        0 likes
        Last Post funk10101  
        Started by gravdigaz6, Yesterday, 11:40 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X