Multicurrency trading functionality

 

Hi All,

 I have been writing an EA in MQL4 for the past few days. Now I have come to know that MQL4 doesn't support multicurrency trading. I was wondering if Multicurrency trading is possible in MQL5? How difficult is it to convert MQL4 code to MQL5? My main code is in MATLAB. Would it be better to just use some kind of link instead of writing code again?

  lookback[i][1]= iClose("USDJPY",PERIOD_M30,param-1-i);
  lookback[i][2]= iClose("EURUSD",PERIOD_M30,param-1-i);


  OrderSend("USDJPY",OP_SELL,vol_times,Ask,30,0,0,NULL,magic,0,clrRed);
  OrderSend("EURUSD",OP_BUY,vol,Bid,30,0,0,NULL,magic,0,clrRed);
 
cryptex:

Hi All,

 I have been writing an EA in MQL4 for the past few days. Now I have come to know that MQL4 doesn't support multicurrency trading. I was wondering if Multicurrency trading is possible in MQL5? How difficult is it to convert MQL4 code to MQL5? My main code is in MATLAB. Would it be better to just use some kind of link instead of writing code again?

MT4/MQL4 allow support multicurrency trading, it's only the Strategy Tester that can NOT be used to test your strategy.

The difficulty to convert in mql5 depends of your strategy. 

 
Alain Verleyen:

MT4/MQL4 allow support multicurrency trading, it's only the Strategy Tester that can be used to test your strategy.

The difficulty to convert in mql5 depends of your strategy. 

Thanks for replying. Will the below work in MT4? Someone pointed out that since it contains predefined variables(Ask and Bid) it might not. This I think i can take care by using Marketinfo function. What about PERIOD_M30 and iClose?

  lookback[i][1]= iClose("USDJPY",PERIOD_M30,param-1-i);
  lookback[i][2]= iClose("EURUSD",PERIOD_M30,param-1-i);


  OrderSend("USDJPY",OP_SELL,vol_times,Ask,30,0,0,NULL,magic,0,clrRed);
  OrderSend("EURUSD",OP_BUY,vol,Bid,30,0,0,NULL,magic,0,clrRed);
 
cryptex:

Thanks for replying. Will the below work in MT4? Someone pointed out that since it contains predefined variables(Ask and Bid) it might not. This I think i can take care by using Marketinfo function. What about PERIOD_M30 and iClose?

No it will not work, Bid/Ask are related to current chart(symbol) only.

I edited my post :

With MT4, it's only the Strategy Tester that can NOT be used to test your strategy.