Is there a key to unload a running Expert ?

 
It is easy to set an expert to run for a particular pair, but there are times when I want to stop that EA for that particular pair.
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
 
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.
 
 
JJF:

dude by coding not directly from MT4,

 

anyway the answer is calling this function with whatever is your condition

ExpertRemove();


 it remove EA from your chart but if you already draw some objects or orders you have to remove them before this code 

 
aminlv:

anyway the answer is calling this function with whatever is your condition

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.