How do you stop opeation of an EA??

 
An obvious question and I'm sure there is a simple answer staring me in the face, but, as Blackadder would say, "bugger me with a fish fork" if I can see it?
 

In my EA, I've got this thing called NoNewOrders (true/false) which probably doesn't exist in other EAs.

I haven't got around to implementing StopOperation. When is that supposed to cut in?

 

Blackadder may on the other hand say:

- right click on top-right smiley face, Expert Advisors / Remove.

 
  1. bool enabled=true;
    start(){
       if (!enabled) return;
       ...
       if (condition) enabled=false;
  2. Remove an EA through MQL4 code



 
blogzr3:

In my EA, I've got this thing called NoNewOrders (true/false) which probably doesn't exist in other EAs.

I haven't got around to implementing StopOperation. When is that supposed to cut in?



That sounds more like Baldrick. Blackadder would actually like the EA to stop under certain conditions when he is away partying - so not actually there to click anything!!!!

 

Thanks for that - Guess it really was simple in the end, especially when you see someone else's solution!!!!
 

BTW....

As a non_programmer, is my understanding correct?

if (!enabled) is the same as if(enabled == false)


thanks a million pips

 
jgf:
if (!enabled) is the same as if(enabled == false)

Yes, that is correct. WHRoeder likes to copy and paste code, but that doesn't mean he knows what Blackadder considers to be suitable conditions for stopping an EA.