MQL4 - automated forex trading   /  

Forum

How do you stop opeation of an EA??

Back to topics list To post a new topic, please log in or register

avatar
18
jgf 2011.06.09 19:24 
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?
Individual Psychology of a Trader

Individual Psychology of a Trader

A portrait of a trader's behavior on the financial market. Author's own menu from the book "Как играть и выигрывать на бирже" ("How to speculate on stock exchange and win") by A. Elder.


avatar
441
blogzr3 2011.06.09 19:31 

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?



avatar
441
blogzr3 2011.06.09 19:39 

Blackadder may on the other hand say:

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


avatar
4328
WHRoeder 2011.06.09 19:55 
  1. bool enabled=true;
    start(){
       if (!enabled) return;
       ...
       if (condition) enabled=false;
  2. Remove an EA through MQL4 code




avatar
18
jgf 2011.06.09 20:15 
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!!!!




avatar
18
jgf 2011.06.09 20:24 

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

avatar
18
jgf 2011.06.09 20:28 

BTW....

As a non_programmer, is my understanding correct?

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


thanks a million pips


avatar
441
blogzr3 2011.06.09 20:45 
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.

Back to topics list  

To add comments, please log in or register