ERROR: Error on setting indicator plot for indicator 'MultiInstrument'. Value outside of valid range.
Now, I have done my homework and am checking for all instruments at the beginning of my OnBarUpdate() method:
try {
bool proceed = true;
if (Bars == null ||CurrentBar < 1) {
proceed = false;
}
for (int j = 1; j <= numSymbols ; j++) {
if (Opens[j].Count < Smooth + 1 || CurrentBars[j] < 1) {
proceed = false;
}
if (Closes[j].Count < Smooth + 1 || CurrentBars[j] < 1) {
proceed = false;
}
if (Volumes[j].Count < Smooth + 1 || CurrentBars[j] < 1) {
proceed = false;
}
}
if (Close.Count < Smooth + 1 || CurrentBar < 1) {
proceed = false;
}
if (proceed) {
// do my business....
}
} catch (Exception e) {
Print(Time[0]+ " Error!" + " " + e.ToString());
Log(Time[0]+ " Error!" + " " + e.ToString(), LogLevel.Error);
}
Is there any you guys can think of I may have missed? It's really annoying that I have to relaunch the indicator every time I accidentally scroll over too far.
Any input would be appreciate?

Comment