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'

    I have a custom indicator that was converted from NT7 to NT8, it compiles ok but when applied to a chart, I keep getting the error "Error on calling 'OnBarUpdate' method on bar 50. Index was outside the bounds of the array". I have not been able to get this error to go away. I don't know what I'm missing. Any help would be appreciated. The source code is attached for reference
    Attached Files

    #2
    Hello mlarocco,

    Below is a link to a forum post on indexing errors.
    Hello, I want to create an indicator that show data in a chart but calculate in other charttime different to the time of the chart where is showed. For example:


    Indexes for collections like series or arrays appear like this [1]. This would be an index of 1, or the second element in the collection (as collection indexes start with 0).

    The next step is to identify which index is invalid.

    What is the line of code causing the error in your script?
    (Comment out all of the code until the error stops, uncomment one line at a time and test to see which line causes the error to return)​

    What indexes are used on that line?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    580 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    335 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    102 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X