How to Disable / Enable Expert programmably ? - page 3

 
wadi2014:

I found solution as following codes

I did make Run=true to stop toggling the auto trading button from on to off and so on.

But i want to toggle Run after change it from true to false, to true again without click on Run to select true again on the EA.

So how to do that with MQL4 ?

Thanks Sooooooo Much for this code!!! ;-)
 
Who knows the same solution for MQL5? 
 
Alain Verleyen #:
You cannot disable auto trading by mql4 code, as I already said. You can follow onewithzachy suggestion by using a GlobalVariable to disable your EAs.

it is possible, I am searching for this too, but I found an ea called guardian equity that once stop all trades after a condition, this desable the autotrading directly from the platform.