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 xiinteractive, 04-09-2024, 08:08 AM
        2 responses
        10 views
        0 likes
        Last Post xiinteractive  
        Started by Irukandji, Today, 09:34 AM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by RubenCazorla, Today, 09:07 AM
        1 response
        5 views
        0 likes
        Last Post RubenCazorla  
        Started by TraderBCL, Today, 04:38 AM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        11 responses
        1,423 views
        0 likes
        Last Post jculp
        by jculp
         
        Working...
        X