Experts: Multi Currency Template

 

Multi Currency Template:

This is Multi Currency Expert Advisor Template that can trade according to symbol list (default 6 symbols). For Example, Ichimoku Chinkou Span is used for entry logic. // Main input parameters input double Lots = 0.01; // Basic lot size input int StopLoss= 50; //Stoploss (in Pips) input int TakeProfit=100; //TakeProfit (in Pips) input int TrailingStop = 15; // Trailing Stop (in points) input int TrailingStep = 5;// Trailing Step (in points) input int Magic=1; // Magic Number input int Slippage = 100; // Tolerated slippage in brokers' pips string symbol[] = { "AUDUSD","USDCAD","USDCHF","EURUSD","GBPUSD","USDJPY"};

Author: DADALI ARWALY

 
This EA cannot be backtested due to Metatrader 4 do not support Multisymbol Strategy Tester.
 
When i add EA to charts, no any show?
 

This EA is just example for Multisymbol function

You can just remove the entry logic and choose any symbol to see how it is worked.

For Example:

string symbol[] =   { "EURCHF"};
void Signal(string sym)
  {
   if(CheckMoneyForTrade(sym,Lots,OP_BUY) && CheckVolumeValue(sym,Lots))
     {
      LimitBuy(sym);
     }
   Trail(sym);
   return;
  }

That means opening position for EURCHF and Buy Position Only.

What entry logic you will use, that depends on your strategy.

 

Hi Dadali

I'm wondering if it's possible to use the multi currency template, but to open at a set time of day. and where this could be added.  i'd want the system to check for a signal, but wait until a set time to open.

input int  OpenTradeTime=1130;
input int  MinutesToWait=2;


int ct, EndTradeTime;

ct = Hour() * 100 + Minute();

EndTradeTime = OpenTradeTime + MinutesToWaitForTick;
   
if(ct >= OpenTradeTime && ct < EndTradeTime)
 
thanks you mr Dadali arwaly

why trailing stop not active?
 

@Jimmy Saputra

Thanks for checking. I have updated the codes.

 
Is it possible to have this EA Template also go thru an array of Periods? PeriodArray = {"15,30,60,240"}
 
Yes, Metatrader 4 is support Multitimeframe functions.
 
hi mr dadali

order stoplose error, can you fix again? thx
Files:
 
MT5 version?
Reason: