gooly:
I want to make an EA tat is called/running once a day - but here in my test-code every hour [...]
Surely this enters OnTimer() for the first time and then never leaves it, because of the IsStopped() loop?
I don't understand why you're not doing something like the following:
int slp = 3600; void OnInit() { EventSetTimer(slp); } void OnTimer() { strTme = StringConcatenate(myName," @ ",TimeToString(TimeLocal(),TIME_SECONDS)," slp ",(string)slp," sec, next Check(LocTme): ",TimeToString(TimeLocal()+slp)); Comment(strTme); }

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I want to make an EA tat is called/running once a day - but here in my test-code every hour.
It writes a comment with the time (local) of the last run and the time it should run the next time: one hour later.
BUT as you might see the OnTimer() seem to run every tick? Is that a bug or a feature?
It seems as well that after some time the terminal runs at 99% cpu-usage?