Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Data Gobbler
Collapse
X
-
Data Gobbler
I have a short simple indicator that defines a channel in the past ten bars and waits for a breakout. When the breakout happens the bar is painted. The indicator is causing an indexing error and disables my strategy. It seems to be in instruments with quite high volume and at very high bar numbers. I have traced the problem with Print statements and it seems to always be when something has caused the data to rewind to the limit of my loaded data and the next instruction is MAX(). There is an indexing error as there is no data for MAX(). I am at a loss as to what to look for.Tags: None
-
Hello galsermil,
Thanks for your post.
Adding prints will be necessary to find out which line of code the indicator is throwing the error. Once you identify the line, I recommend printing out the index being used in that line so you can observe what index is being given to an object which is throwing that error.
With that information, you could add some error checking to ensure that an invalid index is not used as a reference.
One particular type of indexing error that is commonly seen is when a BarsAgo reference is made before the NinjaScript processes that many bars.
Making sure you have enough bars - https://ninjatrader.com/support/help...nough_bars.htm
Publicly available information on C# indexing errors can be found here - https://stackoverflow.com/questions/...ow-do-i-fix-it
Please let us know if we can be of further assistance.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
4 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
41 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
20 views
0 likes
|
Last Post Today, 03:03 PM |
Comment