Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Error on calling 'OnBarUpdate'
Collapse
X
-
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 referenceTags: None
-
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
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
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
335 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
102 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|
Comment