Something like this is what I would do.
Static Bool iTradeAllowed=true; if(iTradeAllowed==true){ OrderSend();if(Error>0){iTradeAllowed=false;} }else{ Return(0); }
Thanks ubzen,
but my question was really ment as it is. I cannot edit the source code of the EA.
I need to disable the button, maybe is there some bug?
1) Tools > Options > Expert Advisors Tab > UnCheck Enable Expert Advisors.
2) Right-Click > Expert Advisors > Remove Expert Advisor
Sounds like you're trying to *UnCheck Enable Expert Advisors* button when a particular EA which you don't have the source code for throws ??? error message. Of course you want this done automatically using a different EA. From what I understand about error messages, if Code-less EA checks for Error message first then the Error message would be Erased. But even if you could use EA#2 to get last error message, I cannot remember how to *UnCheck Enable Expert Advisors* button code wise. I recommend you do a google search or wait for a Professional to answer.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Can someone please tell me a way, how to disable expert advisors by EA?
I saw a EA once, which throw error of some kind and then the expert advisors got disabled.
Thanks for replies