Download MetaTrader 5

Multi EA

To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
sameerbusiness1
250
sameerbusiness1 2016.01.03 12:33 

Hello 

 

I like to ask if i can use Multi EA in same platform  for example 

using EURUSD 1 m chart with 1 EA

using 30 M chart with EURUSD but another EA

is that possible ? kindly let me know

 

Thanks

Sameer

Marco vd Heijden
Moderator
4708
Marco vd Heijden 2016.01.03 12:53  

yes if you use different MagicNumber for each ea.

but you can also do it in one ea as well if you do not need to look at the actual chart itself, and if you do you can simply switch using,

ChartSetSymbolPeriod(), but for starters separate ea's might be easier to control.

sameerbusiness1
250
sameerbusiness1 2016.01.03 13:37  
Marco vd Heijden:

yes if you use different MagicNumber for each ea.

but you can also do it in one ea as well if you do not need to look at the actual chart itself, and if you do you can simply switch using,

ChartSetSymbolPeriod(), but for starters separate ea's might be easier to control.

Thanks alot for Answering 

Osama Shaban
1451
Osama Shaban 2016.01.03 14:03  
Marco vd Heijden:

yes if you use different MagicNumber for each ea.

but you can also do it in one ea as well if you do not need to look at the actual chart itself, and if you do you can simply switch using,

ChartSetSymbolPeriod(), but for starters separate ea's might be easier to control.

I belive that using different magic numbers in each EA is not enough if coder or coders of both EAs didn't put into consideration to make the EA works well with others. For examples, if decision is needed to generate a new order if total opened orders less than 1. Which means no open orders. In this case it is a big mistake if OrdersTotal() is used. A function like, int CountOrders(int magic)  is needed. 
There are too many points like this must be considered to make the EA works well with others. 

To add comments, please log in or register