OnTimer and OnTick called once
No need to called OnTimer() from OnInit().
Here's a very basic OnTimer() example that works:
#property strict long g_timerCount = 0; int OnInit() { EventSetTimer(1); // every second return INIT_SUCCEEDED; } void OnTick() {} void OnTimer() { PrintFormat("%s(): g_timerCount [%d]", __FUNCTION__, g_timerCount++); }
edit : the method OnTick is called once too even if the EA is in the Chart running and the price changes.
In my computer works fine, but when i put in my VPS,don't work. ( i have other expert advisors running without problems. )
Build :1940
No idea. Post your code if you want additional help.
Hi,i'm trying to discover out why OnTimer is called once.
in my Init Method i have :
Inside the method OnTimer,i'm printing a number.
But this number is printed once and the OnTimer is not called anymore.
Do you have any suggestions ?
edit : the method OnTick is called once too even if the EA is in the Chart running and the price changes.
In my computer works fine, but when i put in my VPS,don't work. ( i have other expert advisors running without problems. )
Build :1940