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
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!![](https://c.mql5.com/forextsd/smiles/shades_smile.png)
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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!![](https://c.mql5.com/forextsd/smiles/shades_smile.png)