I have an indicator having a primary series of 1 minute ES bars and an additional series of 1 tick bars. It works well enough when the Data Series session template is set to "Default 24/7" but if I set it to <use instrument settings> I consistently get an error message "Error on calling 'OnBarUpdate' method for indicator 'PriceSpeed' on bar 1: You are accessing an index with a value that is invalid since its out of range."
Debugging in Visual Studio, this error occurs on a line that sets a value to a Plot!
The line is:
Values[0].Set(x);
There's nothing wrong with the value in x either. Why would the Set() method cause an index out of range error?
The code is pretty short. As I said, it works fine on the 24/7 session template but not on the default for the ES 06-12 market.
-Alex
Comment