when there appears in the log tab the message "5/3/2016 11:22:54 AM Strategy Error on calling 'OnBarUpdate' method for strategy 'a1xWnew/271b9005ace94801b857c51c1ba907d5': You are accessing an index with a value that is invalid since its out of range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
and I can´t locate the problem I want to ask if an issue as described in the message can be avoided with
if (Historical) return;
So, even when in the code I´m referring eg to High[3] that is not there when enabling there shouldnt be an error-message then with if(Historical9 retunr; Correct?
Thank you
Tony
Comment