MT4 Strategy Tester does not support multiple symbols/currencies. You can only test one symbol at a time.
MQL4 also does not have the "MarketBookAdd" function, and has many other differences too.
It might be best to read over the documentation and compare the two environments.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
My strategy uses multiple Symbols.
I use to simulate using SymbolInfoTick and getting the value of two or more symbols on MQL5 as in the code bellow:
It works gets the value of the two ticks.
When I do this on MQL5 it does work, it prints the value of SYMBOL_1 and SYMBOL_2:
input string SYMBOL_1 = "EURUSD"; input string SYMBOL_2 = "EURCHF";
But when I put this code on MQL4 on Oanda it does not work.
Is this a restrition on Oanda Metatrader or it is a restrition on Metatrader itself?
OBS: This does work on live on Oanda Metatrader but does not work on Strategy Tester.
On MQL5 I use:
int OnInit()
{
MarketBookAdd(SYMBOL_1);
MarketBookAdd(SYMBOL_2);
}
To get the book info on another project. Do this influence something?
The MarketBookAdd doesn't exist on MQL4.