Is there a minimum time allowed? I remember reading somewhere about a minimum of 100...it may be for the sleep function, can't remember off hand.
Arturo Lopez Perez:
Hi Everyone!
I hope you are fine. I have a problem -just sometimes-. I am creating a timer handler like this...
EventSetMillisecondTimer(50);
And works fine. But some users experience this error: Cannot set milisecond timer(50) and the program fails.
Am I doing something wrong?
Thanks in advance
#property copyright "author name"
#property link "localhost"
#property version "1.00"
#property strict
int OnInit(){
EventSetMillisecondTimer(50);
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason){
EventKillTimer();
}
void OnTick(){
//code executes here when there is a tick
}
void OnTimer(){
//code here executes every 100ms or as available.
}
Christopher Fernandez Ledon:
Is there a minimum time allowed? I remember reading somewhere about a minimum of 100...it may be for the sleep function, can't remember off hand.
Is there a minimum time allowed? I remember reading somewhere about a minimum of 100...it may be for the sleep function, can't remember off hand.
No, you can use EventSetMillisecondTimer(1) if you so wish.
Which builds is this happening with?
Cool...learning something new every day :)
Thanks honest_knave.
Use it:
https://www.mql5.com/ru/forum/167394

Ошибка "cannot set millisecond timer(100)"
- www.mql5.com
Здравствуйте! У клиента при работе с моим советником возникла ошибка "cannot set millisecond timer(100...
Thanks everyone

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 Everyone!
I hope you are fine. I have a problem -just sometimes-. I am creating a timer handler like this...
And works fine. But some users experience this error: Cannot set milisecond timer(50) and the program fails.
Am I doing something wrong?
Thanks in advance