Download MetaTrader 5

How do I make the EA in MQL4 for multi currency - page 2

To add comments, please log in or register
qjol
3243
qjol  
try this
Ubzen
5394
Ubzen  

Here's a simple template to give you some idea.

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
void start(){
    string  Fx__Symbol;
    string  Symbol_Ray[]={"EURUSD","USDJPY","GBPUSD","USDCHF","AUDUSD","USDCAD"};
    for(int i=0; i<ArraySize(Symbol_Ray); i++){
        Fx__Symbol=Symbol_Ray[i];
        if(IsTesting()){Fx__Symbol=Symbol(); i=9999;}
        /* 
            The Rest Of Your Codes Goes Here..(Within For Loop)
            Will Cycle Through Each Symbol Within The Symbol_Ray Array
            From Left ---> To Right When Attached To A Live Chart.
            When Testing, It'll Only Use The Test Symbol 
            (Mt4 Does-Not Support Multi-Currency Testing)
            Then It Sets i To a High Number Which Avoids Processing
            One Tick Multiple Times While Testing.
        */
}   }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tijo45
190
tijo45  
ubzen:

Here's a simple template to give you some idea.

thanks! this helped a lot.
Mohamed Elkurdi
31
Mohamed Elkurdi  

Have a look in here 

https://forum.mql4.com/68325

 https://www.mql5.com/en/forum/61041

whroeder1
15321
whroeder1  
acday: How do I make the EA in MQL4 for multi currency.
Do not trade multiple currencies
  • You can't use any predefined variables, can't use the tester, must poll (not OnTick,) and usually other problems.
  • Code it to trade the chart pair only. Look at the others if you must.
  • Then put it on other charts to trade the other pairs. Done.
12
To add comments, please log in or register