Spread Guard Live Spread With Average And Ceiling
- Indicators
-
Kenichiro Sakamoto
I'm Kenichiro Sakamoto, the developer behind FXEA365 — a studio building transparent, rule-based Expert Advisors for MetaTrader 5. - Version: 1.10
- Updated: 16 July 2026
FREE — see your spread the way your backtest never showed it: per bar, against its own average, and against a ceiling you set.
Most people filter their entries on indicators. In my own testing, almost every "smart" filter I added to a trend system made it worse — it removed losing trades, but it also removed some of the breakouts that turned into the big winners, and net profit fell. The one filter that consistently paid for itself was a spread ceiling. That one is not a market filter at all: it removes trades that were never profitable to begin with, because the cost of entry ate the edge before the trade started.
To use that filter, you first have to see what your spread actually does. That is all this indicator is for.
=== WHAT IT DRAWS ===
- A histogram of the spread, in points, for every bar.
- The moving average of the spread over the last N bars — your instrument's "normal".
- A ceiling line: either a fixed number of points that you choose, or a multiple of the average.
- Every bar whose spread exceeded the ceiling is coloured red. Those are the bars where entering cost you more than it should have.
- A panel showing the current spread, the average and the ceiling, so you can see at a glance whether now is a bad moment to enter.
=== WHAT YOU WILL PROBABLY FIND ===
Spread is not constant, and it is not random. It widens around the session rollover, around high-impact news, at the Friday close and the Monday open, and on thin instruments during the Asian session. If your strategy happens to trade at those moments, a fraction of your edge is being handed to the broker before the position even opens — and a backtest run on average spread will never tell you.
=== SETTINGS ===
- Avg_Period (default 100): how many bars to average the spread over.
- MaxSpreadPts (default 0): a fixed ceiling in points. Set 0 to use the multiple below instead.
- Ceiling_Mult (default 2.0): the ceiling as a multiple of the average spread. 2.0 means "twice the normal spread is too much".
- ShowPanel: turn the on-chart panel on or off.
There is no universal correct ceiling. Watch your instrument for a few days, see where the red bars fall, and set the number so that it catches the blowouts and not the ordinary noise.
=== HONEST NOTES ===
This is a visualisation tool, not a signal. It will not tell you when to buy. It tells you when entering is expensive — which, for a system that trades often, matters more than most people think.
MT4 note: MetaTrader 4 does not store a per-bar spread in its history, so on MT4 the spread series is recorded live while the indicator runs. Bars that existed before you attached it show the current spread as a placeholder. The panel and the bars from now on are the part to trust. The MT5 version reads the real per-bar spread from history and is accurate on old bars too.
=== THE EXPERT ADVISORS THAT ACTUALLY USE A SPREAD CEILING ===
Every EA we sell refuses to open a position when the spread is above a limit you set - the filter this indicator exists to help you calibrate. All of them use a hard stop-loss on every trade, one position at a time, no martingale and no grid. Real-tick numbers:
Profit factor 1.48, maximum equity drawdown 19.7%, 1,193 trades over 7.5 years.
Profit factor 1.49, maximum equity drawdown 27.2%, 533 trades from January 2022 to July 2026 in Ultra, the shipping default. Standard mode measured 18.5% maximum equity drawdown on the same window.
Most people filter their entries on indicators. In my own testing, almost every "smart" filter I added to a trend system made it worse — it removed losing trades, but it also removed some of the breakouts that turned into the big winners, and net profit fell. The one filter that consistently paid for itself was a spread ceiling. That one is not a market filter at all: it removes trades that were never profitable to begin with, because the cost of entry ate the edge before the trade started.
To use that filter, you first have to see what your spread actually does. That is all this indicator is for.
=== WHAT IT DRAWS ===
- A histogram of the spread, in points, for every bar.
- The moving average of the spread over the last N bars — your instrument's "normal".
- A ceiling line: either a fixed number of points that you choose, or a multiple of the average.
- Every bar whose spread exceeded the ceiling is coloured red. Those are the bars where entering cost you more than it should have.
- A panel showing the current spread, the average and the ceiling, so you can see at a glance whether now is a bad moment to enter.
=== WHAT YOU WILL PROBABLY FIND ===
Spread is not constant, and it is not random. It widens around the session rollover, around high-impact news, at the Friday close and the Monday open, and on thin instruments during the Asian session. If your strategy happens to trade at those moments, a fraction of your edge is being handed to the broker before the position even opens — and a backtest run on average spread will never tell you.
=== SETTINGS ===
- Avg_Period (default 100): how many bars to average the spread over.
- MaxSpreadPts (default 0): a fixed ceiling in points. Set 0 to use the multiple below instead.
- Ceiling_Mult (default 2.0): the ceiling as a multiple of the average spread. 2.0 means "twice the normal spread is too much".
- ShowPanel: turn the on-chart panel on or off.
There is no universal correct ceiling. Watch your instrument for a few days, see where the red bars fall, and set the number so that it catches the blowouts and not the ordinary noise.
=== HONEST NOTES ===
This is a visualisation tool, not a signal. It will not tell you when to buy. It tells you when entering is expensive — which, for a system that trades often, matters more than most people think.
MT4 note: MetaTrader 4 does not store a per-bar spread in its history, so on MT4 the spread series is recorded live while the indicator runs. Bars that existed before you attached it show the current spread as a placeholder. The panel and the bars from now on are the part to trust. The MT5 version reads the real per-bar spread from history and is accurate on old bars too.
=== THE EXPERT ADVISORS THAT ACTUALLY USE A SPREAD CEILING ===
Every EA we sell refuses to open a position when the spread is above a limit you set - the filter this indicator exists to help you calibrate. All of them use a hard stop-loss on every trade, one position at a time, no martingale and no grid. Real-tick numbers:
Profit factor 1.48, maximum equity drawdown 19.7%, 1,193 trades over 7.5 years.
Profit factor 1.49, maximum equity drawdown 27.2%, 533 trades from January 2022 to July 2026 in Ultra, the shipping default. Standard mode measured 18.5% maximum equity drawdown on the same window.
