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); //---
Charly Oudy:
Look at the Error value, MT5 will tell you why.
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 ?

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
Hello fellow traders
Could somebody assist me in fixing this error for an EA I am Demoing?
Thanks in advance