Rollover Spread Widening and How to Set a Filter Threshold
Contents (5)
- Bottom line: set the threshold from the spreads you record on your own account and the target range per trade
- Why thin-margin EAs break when spreads widen late at night
- Expectancy deteriorates non-linearly with cost
- Buys and sells are affected differently
- It rarely shows up in backtests
- Steps to set the threshold
- 1. Record spreads by time of day
- 2. Look at the median and upper percentile for each hour
- 3. Work back from the target range to an upper limit
- 4. Decide whether to combine it with a time block
- Limits and cautions
- Summary
Contents
- Bottom line: set the threshold from the spreads you record on your own account and the target range per trade
- Why thin-margin EAs break when spreads widen late at night
- Expectancy deteriorates non-linearly with cost
- Buys and sells are affected differently
- It rarely shows up in backtests
- Steps to set the threshold
- 1. Record spreads by time of day
- 2. Look at the median and upper percentile for each hour
- 3. Work back from the target range to an upper limit
- 4. Decide whether to combine it with a time block
- Limits and cautions
- Summary
Bottom line: set the threshold from the spreads you record on your own account and the target range per trade
Around rollover (at most brokers, the period just before and after the server date changes), liquidity thins out and spreads can widen to several times their normal level. If an EA with a small profit target enters during this window, it can lose most of its target range to cost the instant it opens the trade.
Our conclusion is simple.
- Don't borrow a "recommended value" from the internet. Set the threshold from time-of-day spreads recorded on your own account.
- Then cap it by what share of the EA's target range per trade you can tolerate paying in cost.
- Assume that a spread filter only stops new entries and does not protect positions you already hold.
Recommended Broker Comparison →
🎁 Download Free EA📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators
* Privacy strictly protected. You can unsubscribe at any time.
Why thin-margin EAs break when spreads widen late at night
Expectancy deteriorates non-linearly with cost
Take an EA with a small take-profit and a high win rate. Each win captures only a small price move, so any change in spread flows straight into expectancy. Even if it holds a PF of 1.0 or better under normal spreads, a temporary multiple-fold increase in cost can turn trades in that window into negative expectancy. A trend-following EA with larger targets is affected relatively less by the same widening.
Buys and sells are affected differently
In MT5, chart bars are drawn on the Bid price. A buy position opens at the Ask and closes at the Bid, while a sell position opens at the Bid and closes at the Ask. When the spread widens, the SL of a sell position is triggered by the Ask, so it can be closed even though the price on the chart hasn't reached the SL. If you see an unexplained stop-out late at night, suspect this first.
It rarely shows up in backtests
Testing with the Strategy Tester's "fixed spread" or "current spread" setting barely reproduces the rollover widening at all. Even with "Every tick based on real ticks", what's recorded is the spread of the broker that supplied the data. Keep in mind that it won't match how spreads widen on the account you actually trade.
Steps to set the threshold
1. Record spreads by time of day
Log the spread to a CSV, per tick or per minute, for at least a few weeks. For logging scripts and tools, see also MT5 tools. Rollover widening can behave differently after weekends, at month-end, and around holidays, so ideally your recording period includes them.
2. Look at the median and upper percentile for each hour
The average is pulled around by brief extreme spikes, so line up the median and an upper percentile (around the top 5%) for each time slot. Also check the offset between server time and Japan time, and note that the rollover time itself shifts when daylight saving time changes.
3. Work back from the target range to an upper limit
Decide what share of the EA's average take-profit the spread can take up before the EA should skip the trade. The right share depends on the EA's win rate and payoff ratio, so there is no universal value. Try several candidate thresholds and watch at the same time how much the number of trades drops.
4. Decide whether to combine it with a time block
| Method | Strength | Weakness |
|---|---|---|
| Spread filter (judged by value) | Stops entries the moment spreads widen, regardless of broker or season | Can't stop an entry placed just before the widening |
| Time block (no entries for ◯ minutes before and after) | Reliably avoids the period before the widening starts | The window drifts when daylight saving or the server time changes |
| Both combined | Fewer misses | Fewer trading opportunities and more room for configuration mistakes |
We recommend combining both for thin-margin EAs. For EAs with larger targets, test whether the spread filter alone is enough before deciding.
Limits and cautions
- A filter does not protect positions you already hold. An EA that holds overnight takes the SL evaluation and swap effects during rollover as they come.
- Set the threshold too tight and trading disappears entirely. At some brokers the normal spread already exceeds the threshold in certain hours, which is a common cause of "the EA isn't trading."
- Demo and live accounts don't necessarily show the same spreads. The forward test we keep running on an Exness demo account likewise can't be said to match live execution conditions.
- Raising and lowering the threshold and picking the value with the best backtest result is the doorway to overfitting. Base your choice on the recorded spreads and the target range.
- How much spreads widen varies by broker, account type, symbol, and period, and we don't claim to know every environment.
The shorter an EA's holding time, the larger the share of results that per-trade cost accounts for (for example, GOLD TRIPWIRE has an average holding time of 2:38:15 in backtests). Check spread tendencies for the broker you use in the FX broker comparison, and for an environment that runs stably overnight, see the VPS guide.
Summary
- Spreads widen around rollover, and thin-margin EAs are the first to lose their expectancy
- Set the threshold from the median and upper-percentile spreads by time of day, recorded on your own account
- Cap it by cost as a share of the average take-profit, and watch how much the trade count falls at the same time
- Whether to add a time block depends on the EA's target range and holding time
- A filter only stops new entries. Separately, watch the SL evaluation (on the Ask) of sell positions you already hold
- Backtests rarely reproduce rollover widening, so verify with forward-test records
Related
2026-11-16
EA Weekend Holding Risk and Friday Close Design
2026-11-11
Partial Close + Trailing Stop: Where EAs Break
2026-11-07
Stop Level and Freeze Level: Why Your SL Gets Rejected
2026-10-02
XAUUSD EA Settings: Risk, MaxSpread, SL, Time Filter
📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators
* Privacy strictly protected. You can unsubscribe at any time.
Have a question about EAs or FX?
You can post it on the Nattzy trading forum (free sign-up). Questions beyond this article are welcome too — EA settings, choosing a broker and more.
Ask on Nattzy ↗