curr[0]="EURGBP"; curr[1]="GBPUSD"; curr[2]="EURAUD"; ... ... curr[9]="NZDUSD"; for(int j=0; j<=9; j++) { if(ADX(curr[j])>0) Buy(curr[j],0.01); if(ADX(curr[j])<0) Sell(curr[j],0.01); }
something like this I think
Dario T.: I have an EA that works properly on EURUSD...
Now I want it to work on others 10 different cross...
Assuming it was coded to trade the current symbol, just put it on other charts. Done.
Do not trade multiple currencies in one EA.
- You can't use any {MT4: predefined variables, MT5: predefined variables,} can't use the tester, must poll (not OnTick,) and usually other problems, e.g. A problem with iBarShift - MQL4 and MetaTrader 4 - MQL4 programming forum- Page 2
- You must handle History {MT4: 4066/4073 errors: Download history in MQL4 EA - MQL4 and MetaTrader 4 - 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.)
- Then put it on other charts to trade the other pairs. Done.
Thanks Samih, I'm on the right way... Now you confirmed !

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
Hi Guys,
I have an EA that works properly on EURUSD...
Now I want it to work on others 10 different cross...
What is the best practice in this case ?
Should I have to implement a loop on each cross ?
Thanks to support!