"Code snippets" has the following...
for (int index = 0; index < count; index++)
My Questions
1.) Does (index = 0) equal the most recent bar closed?
2.) If count = 20, does the above statement retrieve the last 20 index values?
3.) If "count" equals number of bars, what does "index" represent?
The only info I could find that may relate to any of these was in NT0019.
NT0019
The following NT0019 error code information is provided within the context of NinjaScript. The examples provided is only a subset of potential problems that this error code may reflect. In any case, the examples below provide a reference of coding flaw possibilities.
Error Code Explanation
This error can happen when a DataSeries is compared to another object via the use of relational operators. Relational operators (==, <, >, <=, >=) can be used to compare the values of the DataSeries but not the DataSeries object itself.
To fix this error ensure that you are actually comparing the values of the DataSeries to another object. You can do this by adding the index value to the DataSeries call. The index value is on a zero-based referencing system. [0] references the latest bar while [1] references one bar ago and [2] references two bars ago.
If I could get answers to these 3 questions, it would help alot.
Thanks,
RJay
Comment