Can MQL4 expert advisor support trading multiple currencies?

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:

tring   Pairs[28] = {"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"};
string   symbol;

And then I have this code:

for(int j=0; j<=27; j++)
     
      {
      
      Pairs[j] = symbol;
      
      OpenPrice = iOpen(symbol,0,1);
      ClosePrice = iClose(symbol,0,1);
     
       ...........

     }

But it is not working. Can anybody tell me why?

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”, …"}

Hi, if you want create EA for MT4 it that will not work, MT4 not support multi currency EA. Regards Greg

  1. False, works just fine. It is the tester that doesn’t support multi-currency.

  2. I recommend: Do not trade multiple currencies in one EA.

Thank you! That was a stupid mistake from me!

I really appreciate your feedback! Thank you very much. I think I will stick to one EA one pair as you recommend.