OnTick() and OnTimer() event handler stop working when MT4 terminal minimized.... ?

 

It seems that OnTick() and OnTimer() event handler used to work before, but recently I found they stop working when I minimize MT4 terminal, and they will come back to work when I un-minimize MT4 terminal. Does anyone found this issue?

Test of OnTick()

0       14:48:33.850    EA GBPJPY,H1: initialized
0       14:48:33.850    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:48:33.954    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:48:35.151    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:48:35.966    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:48:36.813    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:48:37.841    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:48:39.929    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
/*Terminal minimized*/
/*Terminal un-minimized*/
0       14:51:53.586    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)
0       14:51:54.307    EA GBPJPY,H1: INFO: OnTick (EA.mq4; void OnTick(); Line: 146)


Test of OnTimer(). I tried both EventSetMillisecondTimer(256) and EventSetTimer(1) OnInit(). Both of them have the same issue.

        13:49:45.080    EA GBPJPY,H1: initialized
0       13:49:45.369    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:45.615    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:45.877    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:46.155    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:46.415    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:46.692    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:46.939    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:47.205    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:47.472    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:47.740    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:48.003    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:48.267    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:48.536    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:49:48.800    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
/*Terminal minimized*/
/*Terminal un-minimized*/
0       13:50:03.542    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:50:03.553    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:50:03.685    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:50:03.953    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:50:04.224    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)
0       13:50:04.469    EA GBPJPY,H1: INFO: OnTimer (EA.mq4; void OnTimer(); Line: 152)

My OS information:

Microsoft Windows 1803 (OS 17134.706)
Windows 10 Professional

 

What OS do you have?

On my system - Win 8.1, build 1170 - it works fine.

int OnInit()
  {
//--- create timer
   EventSetTimer(1);
   
//---
   return(INIT_SUCCEEDED);
  }

void OnTimer()
  {
//---
   Print("kyp");   
  }
It prints.
 
kypa:

What OS do you have?

On my system - Win 8.1, build 1170 - it works fine.

It prints.

I have updated my original post. None of OnTick() or OnTimer() invoked when MT4 terminal minimized.

My OS version:
Microsoft Windows 1803 (OS 17134.706)
Windows 10 Professional

 

It is probably a Windows 10 issue. Windows 10 has many issues like that.

Anyway it is a problem, I reposted your report in a thread about bugs and errors in the Russian section, which MetaQuotes people read regularly:

https://www.mql5.com/ru/forum/1111/page2442#comment_11422774

Ошибки, баги, вопросы
Ошибки, баги, вопросы
  • 2019.04.23
  • www.mql5.com
Общее обсуждение: Ошибки, баги, вопросы
 
kypa:

It is probably a Windows 10 issue. Windows 10 has many issues like that.

Anyway it is a problem, I reposted your report in a thread about bugs and errors in the Russian section, which MetaQuotes people read regularly:

https://www.mql5.com/ru/forum/1111/page2442#comment_11422774

I am sorry. This is a bug of my program. Please recall your post...

 
Hello please check the energy balance settings and priority settings for running applications in background.