EA to deactivate all the another EA's if an x ammount of pipps target its reached...

 

Hi guys,

i would like to ask for a favour.. i need an expert advisor, that its deactivateing all the another expert advisors activated on the account, when an X ammount of pipps it was been reached.. then on the day 2 its activateing back again from 00:00...

The expert also needs to have a Stop Loss overall level for deactivation as well... ie. so if the expert hits an x ammount in negative pipps, all the expert advisors are kicked.. and no trades are accepter for the day... and the next day reactivated..

thanks guys in advance.....

Gl with the trades!

 

You can not do that from the code (there is no such function to suspend or to remove an EA from a chart). Even if you manage to circumvent that (by sending a series of keyboard events to remove or stop the EA) you would have a problem when restarting the EAs

The easiest way (the first that comes to mind) is that you can alter all your EAs to use some global variable as a kind of a "semaphore" : name it (just as na example) "EAsCanWork" and then use some value when EAs can work and some other value when they can not, put a checking code at the start of the start() function and then you can, by controlling the global variable value, control all EAs if they can work or not

nzsolt85@yahoo.com:
Hi guys,

i would like to ask for a favour.. i need an expert advisor, that its deactivateing all the another expert advisors activated on the account, when an X ammount of pipps it was been reached.. then on the day 2 its activateing back again from 00:00...

The expert also needs to have a Stop Loss overall level for deactivation as well... ie. so if the expert hits an x ammount in negative pipps, all the expert advisors are kicked.. and no trades are accepter for the day... and the next day reactivated..

thanks guys in advance.....

Gl with the trades!
Reason: