What actually triggers "Cannot set milisecond timer(n)" error and how to handle it? - page 2

 
whroeder1:
FYI, third reason: MT4 indicator, placed on chart, no problem. Loaded by iCustom, call fails, no error at iCustom.

Fourth reason. No more resource on the system (error 4024, I also had error 4030 sometimes).

From Stringo, MQ developer.

We will think.

To begin with, we will extend the diagnosis - there maybe 5 or 6 reasons for failure. At the same time we will conduct a revision of the code, perhaps some error crept in

cannot set millisecond timer (500)
cannot set millisecond timer (500)
  • 2017.01.13
  • www.mql5.com
Здравствуйте, клиент прислал лог файл, в котором я увидел такую запись cannot set millisecond timer (500) что она значит? и почему...
 

EventSetMillisceondTimer may fault by 100500 reasons. But not one of it cant`t  resolvs in infinite loop.

Your should gain possiblities to system for free`s required resources (Timer handles) and reuse it
In real apps algo. is much stronger, but your may use foolows template:

int OnInit() {

  hasTimer=EventSetMilliseconndTimer();

}

void OnTick() {

  if (!hasTimer) hasTimer=EventSetM...

}

void OnChartEvent() {

  if (!hasTimer)....

}