Expert Advisor does not run at each new tick

 
Is there any way for an Expert Advisor does not run at each new tick?
 
jugivi:
Is there any way for an Expert Advisor does not run at each new tick?


Yes, divide by zero, EAs disabled, EAs not turned on, etc, etc, etc

 
Sorry, I have not explained well ... I mean I do not want to run each new tick, I want to control when to run the EA. Is this possible?.
 
jugivi:
Sorry, I have not explained well ... I mean I do not want to run each new tick, I want to control when to run the EA. Is this possible?.

Yes, you can return(0); early and just, for example, run once per bar.
 
Thanks for the reply, but ... could you be a little more explicit? At the moment do not know how to do it ... Thanks
 
jugivi:
Thanks for the reply, but ... could you be a little more explicit? At the moment do not know how to do it ... Thanks
You may also use operator Sleep(), publication.
 
jugivi:
Thanks for the reply, but ... could you be a little more explicit? At the moment do not know how to do it ... Thanks
Can you be a little more explicit on what you are stuck with ? do you understand what return(0); does ?
 
paladin80:
You may also use operator Sleep(), publication.
That is a very bad idea . . . and will fall flat on it's face in the Strategy Tester.
 
I understand that return (0) returns control to the beginning of the Start function, is that correct?. But what if when running start function gets a new tick?, Is reset start or finish before running the whole show?.
 

First check out on what condition you want EA to run e.g. new-bar, a particulr value by indicator etc. In start(), check this condition at very begining. If condition not met then return(0) else proceed.

Hope this helps...

 
jugivi:
I understand that return (0) returns control to the beginning of the Start function, is that correct?. But what if when running start function gets a new tick?, Is reset start or finish before running the whole show?.

start will run once per tick as long as it can finish before the next tick arrives . . . if not that tick will be missed. So start will finish and then wait for the next tick . . .