bool Terminated = false; int start() { if (what ever condition u want Terminated The EA) { Terminated = true; } if (Terminated == true) { Comment("EA IS Temporary Terminated "); return (0); } //the rest of your code return (0); }
I think he wants to terminate his EA manually, at will on one specific chart without disabling all EA's.
You can do it with code if there's some condition that you can isolate on which you'd be terminating it but obviously mql can't read your mind. mql4 does not support input during runtime but mql5 does. you can use the termination algorithm above and condition it on a 'pause' button object that you place on the chart.
Only 6 years later too! PS lots of functions didn't exist 6 years ago ;)
aminlv:
it remove EA from your chart but if you already draw some objects or orders you have to remove them before this code
Not if you have already coded OnDeinit() correctly.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
If I'll just disable (CTRL-E), it will disable all running EA's for all other pairs.
The system doesn't offer a simple way to 'unload' the EA. The options are to replace it with another EA (drag another to the windows) or to close the window's pair and reopen it again..
Is there a Key Code: CTRL_<something> or some F-Key to unload an EA?
James