Possible Error :: Cannot set timer error when section in timer function is not commented out . - page 2

 
Vladislav Boyko #:

Try not to kill the timer here:

To make the code inside the OnTimer() be executed only once, you can use the flag.

Perhaps the timer just took offense at you for killing him. He will still write "timer" in his journal, but he does not want to trade for you after you treated him ugly.


This is just another joke of mine, but I think you should check it out.

😂 😂 well , nothing to lose ... hmm nope . It does not care if it lives or dies  😂
 

The issue seems to be that you're calling EventKillTimer() in the OnTimer() function, which is causing the timer to be killed immediately after it is started.

This is preventing the code within the timer from executing, resulting in the error you're seeing when trying to set the millisecond timer.

 
Oh sorry, my English is a bit slow, I think it was a little joke right? I hope it's solved then
 
Enrique Enguix #:
Oh sorry, my English is a bit slow, I think it was a little joke right? I hope it's solved then

Yeah , the optimization is not running today on mt5 and the ea can set a timer without problem . It's definetely related to all the cores being busy . 

But again , i s**k sh*t when it comes to hardware stuff (and many other stuff), it may be something Gen 2 of intel cpu does not have  .

The solution if the above is not true is VPS for the trading eas , or 2 machines , or 3 machines , one for testing , one for trading and one for playing solitaire  😊


Reason: