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
Set the timer for half a second. It got a little better. Okay, let's keep it that way for now.
Show me the code.
Show me the code.
I've cleaned up the excess.
But such lags can often be caught manually, or is 500ms normal?
I've cleaned up the excess.
But such lags can often be caught manually, or is 500ms normal?
I've tried this construction instead of removing the marker, just replacing the text if the marker exists, but I haven't noticed any difference
is it often possible to catch lags like this manually, or is it 500ms normal?
This is not a lag. You display the time from OnTimer, then wait for 500ms. In that 500ms the time changes, but OnTimer has not yet been called.
You need to synchronize - set EventSetTimer(1) exactly at the moment when "TimerCurrent changed".
Tried this way to synchronise
It does not work. And I have bad thoughts towards MT5 lag. See for yourself how your script will behave with these changes.Tried this way to synchronise
It does not work. And I have bad thoughts towards MT5 lag.OnTimer is not called after the set number of ms. Hence the accumulated error and the observed lag. Bug!
This is not a lag. You output the time from OnTimer to the screen, then wait for 500 ms. During this 500 ms the time changes, but OnTimer has not yet been called.
You need to synchronize - set EventSetTimer(1) exactly at the moment when "TimerCurrent changed".
Tried this way to synchronise
It does not work. And I have bad thoughts towards MT5 lag. See for yourself how your script will behave with these changes.You have millisecond timer in your code in OnInit, in your post you write regular, one-second timer. I guess you want to use EventSetTimer(1) after all?
First the first timer is synchronised, then the second timer is set.
First there is synchronisation via the first timer, then the second timer is set.
OnTimer is not called after the set number of ms. Hence the accumulated error and the observed lag. It's a bug!
The script in the chart comment shows this bug