I am trying to modify a indicator I have the has bools to create true or false
I wish to add several calculations to insert into the bools to make the condition set for the bool simpler to write
private Series<double> ER0, ER1, ER2, ER3;
in OnBarUpdate region
/// Define ER0, ER1, ER2, ER3
ER3[0] = (High[3] - Low[3]);/// Range High to Low
ER2[0] = (High[2] - Low[2]);
ER1[0] = (High[1] - Low[1]);
ER0[0] = (High[0] - Low[0]);
I can compile but I get error when apply to chart - I had working indicator prior to adding these items
Error states
Indicator Error on calling OnBarUpdate method on bar 0. You are accessing an index with a value that is invalid since it is out of range
Thanks

Comment