How do you stop opeation of an EA??

JGF
186
JGF  
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?
blogzr3
504
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?

blogzr3
504
blogzr3  

Blackadder may on the other hand say:

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

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



JGF
186
JGF  
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!!!!

JGF
186
JGF  

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

BTW....

As a non_programmer, is my understanding correct?

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


thanks a million pips

blogzr3
504
blogzr3  
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.