I'm reading signal from an external indicator (EI).
I read the plot, with this there is no problem. I've donde this awith other indicators and I know how it works.
But with this external indicator (EI) I'm having error: "Error on calling 'OnBarUpdate' method on bar 19: Object reference not set to an instance of an object."
I've printed text and the problem is happening before this instruction:
int barnumber=ChartBars.GetBarIdxByTime(ChartControl, Times[tf][n]);
I'm using several TimFrames, but the error is happening with the actual TF.
If I print just before this sentence the value "Times[tf][n]" I get a correct answer, and the time showing exists in the Chart (it is the bur #6 or 7).
So the error happens when obtaining the Bar from this Time.
Could it be an issue between the number of bars in the primary indicator and in the external indicator?
It shouldn't be becaus it is the same chart....
Thanks!

Comment