Unknown symbol name when backtesting

 

Anyone know why I'm getting this error when testing XAUUSD?

2019.07.17 13:44:20.671    2019.06.28 23:54:59  MACD Lite XAUUSD,M1: unknown symbol name EURUSD for OrderSend function

 
David Diez:

Anyone know why I'm getting this error when testing XAUUSD?

2019.07.17 13:44:20.671    2019.06.28 23:54:59  MACD Lite XAUUSD,M1: unknown symbol name EURUSD for OrderSend function

You can only test with one symbol.

(XAUUSD).

 
Mehmet Bastem: You can only test with one symbol.

No, You can test with other symbols just fine. But in MT4 you can only trade one symbol.

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.
Reason: