There is a logical issue with your indicator.
Ping = PrevTime ? MathAbs(Tick.time_msc - PrevTick.time_msc - (NowTime - PrevTime) / 1e3) : 0;
You can't just take the absolute value and count it as a delay. A -250 ms "in advance" will be counted as a 250 delay, that's not good.
Ticks are often received by packets by MT5, that's why there are negative values.
I don't think it's possible to calculate something precise about it. I removed the MathAbs() and allow negative values, all is well balanced between plus and minus values.
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
Ping:
A real-time indicator showing the lag of quotes inside the terminal.
Author: fxsaber