In your sample code on SampleMultiTimeFrame, the condition is to process event on BarsInProgress =0:
if (BarsInProgress != 0)
return;
However, the following code starts to evalaute values on BarsInProgress 1 and 2:
if (SMA(BarsArray[1], 5)[0] > SMA(BarsArray[1], 50)[0] && SMA(BarsArray[2], 5)[0] > SMA(BarsArray[2], 50)[0])
I would assume SMA(BarsArray[1], 5)[0] would produce an error as it tries to get value from BarsArray[1] instead of 0.
A realted question. What if no such contions as
if (BarsInProgress != 0) return;
Will this sample prouce same results?
Regards,

:
Comment