"cannot set timer" error

To add comments, please log in or register
EVANGFX
11
EVANGFX  

Hello fellow traders

Could somebody assist me in fixing this error for an EA I am Demoing?

Thanks in advance

EVANGFX
11
EVANGFX  

@whroeder1

Thanks a lot! I am not a coder though just a newbie testing some EA's

Charly Oudy
788
Charly Oudy  
EVANGFX:

@whroeder1

Thanks a lot! I am not a coder though just a newbie testing some EA's

Hey Guys, I tried the loop below on my OnInit() function, but after 100 attempts, it still doesn't want to set the timer... any idea ?

//--- create timer
   int error=-1;
   int counter=1;
   do
   {
      ResetLastError();
      EventSetTimer(delay);
      error=GetLastError();
      Print("EventSetTimer(delay);. Attempt=",counter," Error=",error);
      if(error!=0) Sleep(1000);
      counter++;
   }
   while(error!=0 && !IsStopped() && counter <= 100);
//---
Minions Labs
2666
Minions Labs  
Charly Oudy:

Hey Guys, I tried the loop below on my OnInit() function, but after 100 attempts, it still doesn't want to set the timer... any idea ?

Look at the Error value, MT5 will tell you why.
To add comments, please log in or register