How do you backtest with MTF?

 
How do you backtest in strategy tester and you can see multiple timeframes?
 
As far as I know - you can do it now with MT5 strategy tester (and multi pair as well).
 
Sergey Golubev:
As far as I know - you can do it now with MT5 strategy tester (and multi pair as well).

hello Sergey!!! i am looking info about this!!! atm i can not run an ea mtf , because need the historical like offline "mt4"  . Do you have ny reference or guide , how to run mtf strategy tester in mt5?


thanks in advance

 
  1. On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4

    The function linked to, opens a hidden chart for the symbol/TF in question (if not already open,) thus updating history, and temporarily placing the symbol on Market Watch (if not already there,) so SymbolInfoDouble(symbol, SYMBOL_BID) or MarketInfo(symbol, MODE_BID) don't also return zero on the first call.

    On MT5: Unless the chart is that specific pair/TF, you must Synchronize the terminal Data from the Server.
              Is it mystical?! It is! - Withdraw - Technical Indicators - MQL5 programming forum
              Timeseries and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
              Synchronize Server Data with Terminal Data - Symbols - General - MQL5 programming forum
              SymbolInfoInteger doesn't work - Symbols - General - MQL5 programming forum 2019.09.03

  2. I recommend: Do not trade multiple currencies in one EA.
    1. You can't use any {MT4: predefined variables, MT5: predefined variables,}
    2. Must poll (not OnTick, unless you use specific indicators)
                The Implementation of a Multi-currency Mode in MetaTrader 5 - MQL5 Articles
    3. and usually other problems, e.g. A problem with iBarShift - MQL4 programming forum - Page 2
    4. You must handle History {MT4:4066/4073 errors: Download history in MQL4 EA - MQL4 programming forum, MT5: Timeseries and Indicators Access /  Data Access - Reference on algorithmic/automated trading language for MetaTrader 5.}
    5. Code it to trade the chart pair only. Look at the others if you must. Don't assume that Time[i] == iTime(otherPair, TF, i) always use iBarShift (or MT5 equivalent.)
    6. Then put it on other charts to trade the other pairs. Done.
 
The general information about multi-currency strategy tester: "The Strategy Tester is a multi-currency tool, which allows you to test and optimize strategies trading multiple financial instruments. The tester automatically processes information of all symbols that are used in the trading strategy, so you do not need to manually specify the list of symbols for testing/optimization."
Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
Strategy Testing - Algorithmic Trading, Trading Robots - MetaTrader 5 Help
  • www.metatrader5.com
The Strategy Tester allows you to test and optimize trading strategies (Expert Advisors) before using them for live trading. During testing, an Expert Advisor with initial parameters is once run on history data. During optimization, a trading strategy is run several times with different sets of parameters which allows selecting the most...