Your Array contains only 1 value:
[0] == "AUDCAD, AUDCHF, AUDJPY, AUDNZD, AUDUSD, CADCHF, CADJPY, CHFJPY, EURAUD, EURCAD, EURCHF, EURGBP, EURNZD, EURUSD, EURJPY, GBPAUD, GBPCAD, GBPCHF, GBPJPY, GBPNZD, GBPUSD, NZDCAD, NZDCHF, NZDJPY, NZDUSD, USDCAD, USDCHF, USDJPY"
It should be {"AUDCAD", "AUDCHF", ...."}
- False, works just fine. It is the tester that doesn't support multi-currency.
-
Why did you post your MT4
question in the
Root / MT5 EA section instead
of the
MQL4 section, (bottom of the Root
page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - I recommend: Do not trade multiple currencies in one EA.
- You can't use any {MT4: predefined variables, MT5: predefined variables,}
- MT4: can't use the tester.
- must poll (not OnTick, unless you use specific indicators)
The Implementation of a Multi-currency Mode in MetaTrader 5 - MQL5 Articles - and usually other problems, e.g. A problem with iBarShift - MQL4 programming forum - Page 2
- 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.}
- 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.)
- Then put it on other charts to trade the other pairs. Done.
Your Array contains only 1 value:
[0] == "AUDCAD, AUDCHF, AUDJPY, AUDNZD, AUDUSD, CADCHF, CADJPY, CHFJPY, EURAUD, EURCAD, EURCHF, EURGBP, EURNZD, EURUSD, EURJPY, GBPAUD, GBPCAD, GBPCHF, GBPJPY, GBPNZD, GBPUSD, NZDCAD, NZDCHF, NZDJPY, NZDUSD, USDCAD, USDCHF, USDJPY"
It should be {"AUDCAD", "AUDCHF", ...."}
Thank you! That was a stupid mistake from me!
- False, works just fine. It is the tester that doesn't support multi-currency.
- I recommend: Do not trade multiple currencies in one EA.
- You can't use any {MT4: predefined variables, MT5: predefined variables,}
- MT4: can't use the tester.
- must poll (not OnTick, unless you use specific indicators)
The Implementation of a Multi-currency Mode in MetaTrader 5 - MQL5 Articles - and usually other problems, e.g. A problem with iBarShift - MQL4 programming forum - Page 2
- 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.}
- 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.)
- Then put it on other charts to trade the other pairs. Done.
William I really appreciate your feedback! Thank you very much. I think I will stick to one EA one pair as you recommend.
- 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 am trying to create an EA that will trade multiple pairs although only loaded on one pair.
I have created the following two variables:
And then I have this code:
But it is not working. Can anybody tell me why?