I have created a simple MTF strategy that has 3 timeframes (i.e. BarsArray0, BarsArray[1], and BarsArray[2]). An SMA() has been applied to each and the values reported when printing based on BarsInProgress is incorrect for both BarsInProgress == 1 and BarsInProgress == 2 (i.e longer timeframe bars). I am testing this from the Strategy Analyzer and I was using the following:
Contract = ES
BarsArray[0] = 10 Min Bars
BarsArray[1] = 60 Min Bars
BarsArray[2] = 240 Min Bars
The strat is set to CalculateBarsOnClose = true.
Additionally, I have tested this with both EMA and SMA as examples and both are giving incorrect indicator values for BarsArray[1] and BarsArray[2].
I have attached the strat for your review.
Please let me know why this is not working as expected.
Thanks,
Comment