Did you check log files?
If there is no error in the log file, you will have to show code.
hello
i have no error in the log and in my code timer stoped but OnTick has not stoped
hello
please help me i used timer function EventSetTimer EventSetMillisecondTimer ... my code works fine but after hours Timer stops and it can not works, it stops before 24 hours of work , i use some externel function CopyFileW CreateDirectoryW , i has asked my friend and he have like same problem
thank you
It's not documented anywhere but I wonder if the millisecond timer is keeping an internal count somewhere and eventually overflows the upper limit of int (2 147 483 647). Would be pretty easy to put a counter on it and see if that is the case.
The easiest way to try to get around it would be to destroy the timer say once an hour and then recreate it. Might even be enough just to change the timer interval and then change it back?
Either way, I'd suggest sending a bug report to Service Desk. And please report back here so others can learn from the problem :)
Cheers
Why would OnTick() stop?
You should declare OnTimer() function. That function will be called when Timer event occures.
What exactly is happening and what do you expect to happen?
hello
OnTick() did not stop ,
but i tested no this
EventKillTimer();
if(!EventSetTimer(1)){Print("Time Pr.."+GetLastError());return(0);} ,
i has get error 4024 but after some hours i will get only 4024 error and timer will stop
Error 4024 is internal error:
#define ERR_INTERNAL_ERROR 4024 // new MQL4
You should contact Service desk and send them description of the error.
You will find Service Desk link on your profile page.
It's not documented anywhere but I wonder if the millisecond timer is keeping an internal count somewhere and eventually overflows the upper limit of int (2 147 483 647). Would be pretty easy to put a counter on it and see if that is the case.
The easiest way to try to get around it would be to destroy the timer say once an hour and then recreate it. Might even be enough just to change the timer interval and then change it back?
Either way, I'd suggest sending a bug report to Service Desk. And please report back here so others can learn from the problem :)
Cheers
thank you very much , we will compte we have mny vps and we started the test , i think the problem from metatrader , i has maked destroy every 1 second , but it stoped too , i will contact the support
thank you
Error 4024 is internal error:
You should contact Service desk and send them description of the error.
You will find Service Desk link on your profile page.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello
please help me i used timer function EventSetTimer EventSetMillisecondTimer ... my code works fine but after hours Timer stops and it can not works, it stops before 24 hours of work , i use some externel function CopyFileW CreateDirectoryW , i has asked my friend and he have like same problem
thank you