Log your own spread: twenty lines of code beats any broker claim
Posted: Sat Oct 31, 2026 7:51 am
Nobody can tell what a spread does on a given account except that account. A tiny logger solves it. On MT4 or MT5, an indicator or EA with a timer can write one line per second or per minute to a CSV with server time, bid, ask and the difference in points. Leave it running on a chart for a couple of weeks on the pairs traded.
Then the questions get answerable with a spreadsheet or a short script:
- Median and 95th percentile spread for every five-minute slot of the day
- How many seconds the spread stays above double its median around rollover
- Whether spread widens before scheduled news, and by how much
Sampling once a second misses the spikes that last a fraction of a second, so ticks are better if storage allows, but one-second samples already expose the pattern well enough for filtering.
Two details people forget. Record the server timezone offset, otherwise daylight saving changes corrupt the comparison between months. And log on the same account type used for trading, since demo and live feeds can differ.
Once there are two weeks of data, a spread filter threshold can come from the 90th percentile of normal behaviour instead of a guess.
What logging interval do you use, and has the data ever contradicted what the broker's website claims?
Then the questions get answerable with a spreadsheet or a short script:
- Median and 95th percentile spread for every five-minute slot of the day
- How many seconds the spread stays above double its median around rollover
- Whether spread widens before scheduled news, and by how much
Sampling once a second misses the spikes that last a fraction of a second, so ticks are better if storage allows, but one-second samples already expose the pattern well enough for filtering.
Two details people forget. Record the server timezone offset, otherwise daylight saving changes corrupt the comparison between months. And log on the same account type used for trading, since demo and live feeds can differ.
Once there are two weeks of data, a spread filter threshold can come from the 90th percentile of normal behaviour instead of a guess.
What logging interval do you use, and has the data ever contradicted what the broker's website claims?