Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Data Gobbler

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by szferi, Today, 02:04 AM
    0 responses
    4 views
    0 likes
    Last Post szferi
    by szferi
     
    Started by Rosario, Today, 12:50 AM
    0 responses
    4 views
    0 likes
    Last Post Rosario
    by Rosario
     
    Started by MartynBashi, Yesterday, 11:01 PM
    0 responses
    4 views
    0 likes
    Last Post MartynBashi  
    Started by manueldecastro, Yesterday, 10:59 PM
    0 responses
    3 views
    0 likes
    Last Post manueldecastro  
    Started by pkr75, Yesterday, 10:09 PM
    1 response
    4 views
    0 likes
    Last Post pkr75
    by pkr75
     
    Working...
    X