I have read in the documentation that it is possible to test many currencies (and timeframes?) in MQL5 strategy tester, but could not find a clear and simple example...
So I made minimum changes to an EA that comes along with MT5: Moving Averages.mq5, to include a scanning algorithms...
Well it does goes to testing, but shows just one Symbol (as highlighted in the following picutre):
"My" code is:
Don't know how you get a result with this code, it contains a critical error :
for(int i=0; i<p; i++) for(int j=0; j<t; j++) { ThisP = AllPair[j] ; ThisT = AllTime[t] ;
Your MA handle is initialized on chart symbol only.
Beside that, your way to check for a new bar is incorrect.
Thank you Mr. Varleyen
Yes it was a bad typo as I was copy pasting from code to code...
I corrected the loop parameters (not in hurry now to solve the New Bar issue) and definitely saw improvements:
As seen in this picture, the Back test analyzed all the currencies, however traded only in three of them, with a big preference for the first chart pair (EURUSD)
Is this normal? or is it something related to my code?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have read in the documentation that it is possible to test many currencies (and timeframes?) in MQL5 strategy tester, but could not find a clear and simple example...
So I made minimum changes to an EA that comes along with MT5: Moving Averages.mq5, to include a scanning algorithms...
Well it does goes to testing, but shows just one Symbol (as highlighted in the following picutre):
"My" code is: