Page 1 of 1

Spread Logging Script: Recording Your Broker's Pricing Over a Month

Posted: Thu Oct 08, 2026 4:49 pm
by FXS Prop Desk
Averages on broker websites rarely match what you see at your trading hours. Logging spreads yourself gives accurate data.

A simple approach in MT5:
  • A small script or EA that writes time, symbol, bid, ask and spread to a CSV file every few seconds.
  • Run it on a VPS for a month on your main pairs.
  • Analyse the file in a spreadsheet or Python: average, median and 95th percentile spread per hour.
What the data typically reveals:
  • Wide spreads around rollover (17:00 New York).
  • Differences between Monday and the rest of the week.
  • Spikes around news that are larger than expected.
Running the same script on two brokers side by side gives a fair comparison.

Has anyone logged spreads over a long period, and what surprised you?

Re: Spread Logging Script: Recording Your Broker's Pricing Over a Month

Posted: Fri Oct 16, 2026 11:47 am
by Shadow Trader
I ran something similar for six weeks on EURUSD and GBPUSD, sampling every two seconds. The file grew to about 140 MB, which is fine, but I would still write one file per day so a crash only costs a day.

The surprise for me was the gap between median and tail. During my window from 08:00 to 10:00 London the median on EURUSD was 0.2 pips, but the 95th percentile was 0.9, and most samples above it sat in the first ten minutes after 08:00.

That changed my entries more than any broker comparison did. I now skip the opening ten minutes unless the setup is exceptional.

One thing to watch in the script itself is that sampling on a timer misses spikes between samples. Logging every tick from an EA catches more, though the file grows quickly on busy days.

Did you find the Monday difference mostly at the Asian open, or does it carry into London? My data showed it fading by about 07:00.