Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Array dimensions exceeded supported range
Collapse
X
-
Array dimensions exceeded supported range
I have an indicator that uses 4 additional secondary series of the primary instrument for MTF purposes. It works fine on a chart but when I try to add it to a strategy I get the error: Array dimensions exceeded supported range. The error goes away when I reduce the number of days to backtest. Any ideas on what causes this?Tags: None
-
Hello Lance El Camino,
Is there other code in the script?
Could the script be calling a Draw method with a negative barsAgo value or barsAgo value that is greater than CurrentBar or outside of BarsInProgress 0?
Is there proper checking in the code that CurrentBars[barsInProgressIndex] is greater than any barsAgo values for the Series of that BarsInProgress?
https://ninjatrader.com/support/help...inprogress.htm
https://ninjatrader.com/support/help...urrentbars.htm
Use prints to determine the specific line of code causing the error.
Using Prints and TraceOrders to understand behavior.
What is that specific line causing the error?Chelsea B.NinjaTrader Customer Service
-
Yes, there are Draw.Rectangle methods where the endBarsAgo value is -100000 so it extends beyond current time. Is there a way to have it keep extending with each new bar that prints?
Comment
-
Hello Lance El Camino,
Using negative indexes for barsAgo values is not supported and would be causing that error.
You can use barsAgo 0 to draw to the current bar.
If you are wanting to render to the edge of the chart, you may want to custom render in OnRender() instead of using a Draw method.Chelsea B.NinjaTrader Customer Service
Comment
-
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
124 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment