Understanding one mechanic of Mt4 backtesting.

 

I found a multitime frame indicator which I report in the attached files. 

This indicator shows me its values in 4 different timeframes (one of these ones is the one plotted on the chart).

This indicator seems to correctly work correctly on forward testing attaching it to a real time chart. However it does not work in backtesting and I found in the forum the explanation (https://www.mql5.com/en/forum/160159/page2).

I wonder how the attached indicator can work, for example. If we are at 21:23 on M1 chart, how this indicator is able to retrieve the M5 values for each M1 candle separately? I wonder if there a way to obtain these values on the backtest, for example at the close of the M1 candle at 21:23 I get the M5 value of the indicator in that time even if it is not totally completed. If not this mean that I need to backtest my EA only in forward testing?


Thank you!

iTime and iBarShift return wrong values when back test for multi timeframes
iTime and iBarShift return wrong values when back test for multi timeframes
  • 2016.09.25
  • www.mql5.com
Hi Guys, Can anyone please help. I wrote a multi timeframe indicator and it runs correctly when loading into a static chart...