How do I make the EA in MQL4 for multi currency

Back to topics list  | 1 2 To post a new topic, please log in or register
avatar
3134
qjol 2012.07.01 18:02 #
 
try this
avatar
3849
ubzen 2012.07.01 19:56 #
 

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.
        */
}   }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

avatar
2
tijo45 2016.01.13 19:55 #
 
ubzen:

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

thanks! this helped a lot.
avatar
9
elkurdiforex 2016.01.16 18:49 #
 

Have a look in here 

https://forum.mql4.com/68325

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

 

avatar
13000
WHRoeder 2016.01.16 19:13 #
 
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.

Back to topics list   | 1 2  

To add comments, please log in or register