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,

    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,

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        72 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        44 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        25 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        30 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        61 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X