Experts: Parallel Strategies Example

 

Parallel Strategies Example:

This is a simple multistrategies EA based on many strategies that work in parallel mode.


 

Author: Rodolphe Ahmad

 
how do i use this on trading?
 
aimtrader:
how do i use this on trading?

Hi , to use on a trading account , just choose on on the 4 strategies you prefer 

ex  Use moving Cross Strategy : true , Use Macd Breakout: false , Use Heiken Ashi : false , Use Heiken + MACD : false

NB:   timeframe must be  Higher the M15  :  to  remove short term volatility.

 

This EA got very good score after optimizing parameter. I will use this EA on EUR/USD in a few days. 

I have one question. The strategy tester doesn't work at weekend (because of market stopping ?).

Would you release how fix it ? 

 
Hello, I must still add to the chart except heiken_ashi_smoothed.mq4 EA also parallel_strategies.mq4 MACD Moving Average and what period of time?
 
hash8000:

This EA got very good score after optimizing parameter. I will use this EA on EUR/USD in a few days. 

I have one question. The strategy tester doesn't work at weekend (because of market stopping ?).

Would you release how fix it ? 

Market is Closed during weekend
 
Danka:
Hello, I must still add to the chart except heiken_ashi_smoothed.mq4 EA also parallel_strategies.mq4 MACD Moving Average and what period of time?
Hi put the heiken ashi smoothed in  /mql4/indicators      and   parallel strategies in mql4/experts . M15
 

One day I will update the EA (V2) and add all strategies I know ( Including my old Murrey math lines code + Hybrid Scalper) , but this time in advanced conditions , + Adding other parameters like: break even ,martingale , Hedge , max trade per day ,max pips per day ,  max trade per pair  .

-------------

Today I remarked that I did some errors * some little bugs in the code*  (little bugs will not affect expert logic) ,
ex  : volume ->   long not double  // iVolume : type Long // just cast to (long) instead of (double) 

 
and  -> int PreviousTime=(int)TimeMinute(TimeLocal());
it's better         datetime  Previous Time =  Time[0];          // not used but its better to to handle datetime as datetime then decomposing each member( ex Year , Month , Day , Hour , Minute , Seconds)



Since All orders are handled by tickets , there is no need for magic numbers , So you can remove all magic numbers , and put NULL , in the create arguments, but I put them , because one day I will update code and add some plugins Then each Magic number will detect the Parent strategy , when I am free...

-------------

Hint:
        MarketInfo(Sym,MODE_BID)  , MODE_ASK  , MODE_SPREAD...

Since Symbol (Sym) is an internal member for class ea ,  then expert can run on multipairs  just drag and drop on one pair to trade all, with this modification in code  

EA  EAS[7];  string easym[7] = {"EURUSD","GBPUSD",etc}...

for ( int i=0; i <7;i++)

{   EAS[i].create(....  easym[i]}  , and during trade 

for ( int i=0; i <7;i++)

{   EAS[i].trade{etc...}}


* OnTimer is Better then on Tick if running on multipairs from one chart (1s Timer)

* Custom Time trade function based on server time


Martingale and Hedge function (For the next version)  ->  OrdersHistoryTotal() , because we have to look in history to hedge loosing positions or for martingale where Magic = Magic and Profit = Condition  . .

 

//   Please if someone found a little  bug that I didn't know PM me and help me fix it    .


Regards.



 
Can you explain how I can set the maximum lots that can be opened at once?
 
Rodolphe Ahmad:

This is a great EA when we will see the V2 and could you please send the update one as per above .



regards

Mfallouh

 
How do I optimize this?  What parameters can be adjusted?  Will it run all of them at once without contradicting itself?
Reason: