Page 2 of 2

Re: Python + MT5: tick latency logger without buying fancy software

Posted: Thu Sep 10, 2026 9:14 pm
by PTScalper
LondonScalper wrote: Thu Sep 10, 2026 6:59 pm
PTScalper wrote:Continuous is strictly better, provided you have a localized log rotation.... If you only log around the London or NY opens, you miss the baseline.
Agree on continuous with rotation. Open-only logging makes every spike look like a crisis because you never measured the quiet baseline.

Lean stack is the point — isolate broker lag from your own VPS/network without renting another SaaS toy. I want terminal truth, not a vendor dashboard that averages away the ugly minutes.

Practical note from years of this: annotate platform builds and VPS route changes in the same log. Otherwise you’ll “blame the broker” for a week that was actually your own infrastructure drift.
That note on infrastructure drift is pure gold. Nothing wastes more time than diagnosing "broker latency degradation" only to discover a silent route change or host migration added 12ms to your round-trip. Terminal truth over smoothed SaaS p99s every time.

Have a good trades.

Re: Python + MT5: tick latency logger without buying fancy software

Posted: Fri Sep 11, 2026 5:05 pm
by LondonScalper
PTScalper wrote:Nothing wastes more time than diagnosing "broker latency degradation" only to discover a silent route change or host migration added 12ms to your round-trip. Terminal truth over smoothed SaaS p99s every time.
Been there — spent days blaming the venue for what was a quiet VPS move.

I keep a one-line infra diary next to the latency CSV: build number, route/host note, anything that changed. Twelve milliseconds won’t always show in a vendor’s smoothed p99, but it’ll show in your open-window deltas if you have a baseline. Terminal truth first; SaaS charts as optional colour.

Have a good session. If the logger stays boring for a month, that’s success — drama in the latency file usually means something drifted.

Re: Python + MT5: tick latency logger without buying fancy software

Posted: Sun Oct 04, 2026 8:02 am
by LondonNewsTrader
PTScalper wrote: For sub-millisecond truth, a native MQL5 script utilizing EventChartCustom or writing directly via FileWrite is the only way to eliminate observer effect.
It depends on which clock you want. If you pull ticks with copy_ticks_from or copy_ticks_range, every tick carries time_msc, stamped by the server, so Python jitter doesn't touch those timestamps at all. Inter-arrival gaps measured from time_msc show feed gaps. What they can't show is a VPS or terminal stall, because that needs local receipt time, and for that you are right that MQL5 with GetMicrosecondCount() is the better tool.

One caveat on the MQL5 side: an EA doesn't queue ticks. If OnTick is still running when a new tick arrives, that tick event is skipped. So a logger that does work inside OnTick can miss exactly the bursts you want to see, which come on releases. The cleanest setup I've used is a tiny OnTick that only records GetMicrosecondCount() and the tick time into an array, plus CopyTicks afterwards to fill in anything skipped.

Continuous logging is worth the disk space. The quiet Asian baseline is what makes the London and data spikes measurable.

Re: Python + MT5: tick latency logger without buying fancy software

Posted: Sat Oct 17, 2026 10:13 am
by FXS Prop Desk
Logging inter-arrival gaps continuously is a good way to set a baseline. For the Python side, the MetaTrader5 package can call copy_ticks_from to retrieve historical ticks with millisecond timestamps, which lets you compare live gaps with the broker's recorded tick history. If the live logger shows long gaps but the history does not, the problem is local (VPS or connection) rather than the broker feed.