indicators on multiple timeframes

 

Hi to all

Let's say I want to build a simple trading strategy with following rules: if on M30 and H1 price is trending, i.e., EMA20 > EMA50 > EMA100, then buy a pullback on M15. 

The question I have is if I want to backtest this strategy, how do I select the same dates for all three TS? Because if I go back with the index of bars, it'll give incorrect results. 100th bar on M15, M30 and H1 will not be the same date ant time. 

Is what I need iTime or something else?

Note that I'm super new to MQL5. Sorry if the question is not clear

 

Your EA can use all the integrated indiactors (or the custom ones with iCustom, all listed her with all other functions: https://www.mql5.com/en/docs/function_indices) can request them for a specific timeframe.

Look for examples how they are called and used.

Documentation on MQL5: List of MQL5 Functions
Documentation on MQL5: List of MQL5 Functions
  • www.mql5.com
List of MQL5 Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: