Range Filter
Range Filter, also known as Range Filter [DW], Range Filter Buy and Sell, is a Trend concept.
What is a Range Filter?
A range filter is a trend line that moves only when price travels farther from it than a volatility-scaled threshold, holding flat through noise and stepping with real moves. If price sits more than the threshold above the line, the line rises to price minus the threshold; if more than the threshold below, it falls to price plus the threshold; otherwise it stays put. The result is a staircase with a binary direction, up after the last step higher and down after the last step lower.
The best-known version is DonovanWall's Range Filter, published in 2018 as an open-source script on TradingView and described by its author as an experimental study to filter out minor price action. Its threshold borrows the volatility filter of the QQE, applied to price instead of a smoothed RSI: in the widely ported form, an exponential average of absolute bar-to-bar changes, smoothed again and scaled by a multiplier. Later revisions added ATR, standard-deviation and percent-of-price thresholds, and popular buy-and-sell adaptations turned the direction flips into signals.
Mathematically the update is soft-thresholding: the line moves by the part of price's distance that exceeds the threshold, and not at all inside it. That separates it from a moving average, which moves a little on every bar, and from trailing stops like NRTR or Supertrend, which jump to the other side of price. LuxAlgo's Proximal Range Filter generalizes the rule with a 200-period ATR threshold and an adaptation rate that blends a predicted step with the new price before thresholding; at a rate of 1 it reduces exactly to the classic filter.
How to read a range filter
The chart shows the line, its direction, and the target bands that say what it would take to move it.
- 1Read direction from the last step: up is bullish, down is bearish, and flat bars keep the previous state.
- 2Read flat stretches as noise: while price stays within one threshold of the line, nothing new has happened.
- 3Read the target bands, the line plus and minus the threshold, as the prices the next bar must reach to move the filter; a step against the prevailing direction is the flip.
How it's calculated
A gated price filter: the line moves only by the part of price's distance from it that exceeds a volatility threshold.
Lines 3 to 5 equal F_t - F_(t-1) = sign(d) × max(abs(d) - r_t, 0) with d = x_t - F_(t-1), the soft-threshold form.
Lines 1 and 2 are the QQE-style threshold of the widely ported version; ATR, standard-deviation or percent-of-price thresholds slot into r_t unchanged, and published ports ship different default periods and multipliers.
The filter is causal and does not repaint; the current bar's value settles at the close.
How traders use it
- As a trend-state gate: entries from faster tools are taken long only while the filter's last step was up and short only while it was down.
- As a signal line: buy-and-sell adaptations fire on direction flips confirmed by a close on the new side; flips cluster when the threshold is small for the market's noise.
- As levels: flat segments of the staircase mark prices the market has not left far enough to reset, read as support or resistance the next push must clear.
- As an exit: in an up state, a close below the lower band means the line is about to step down, a volatility-scaled exit that sits still through pullbacks smaller than the threshold.
Range Filter vs related trend lines
Supertrend: Supertrend builds ATR bands around each bar's median price and flips its line from one side of price to the other. A range filter has no sides: it follows price at up to one threshold's distance, a filtered price path rather than a stop.
NRTR: NRTR trails a fixed deviation from the trend's extreme and reverses when crossed. The range filter measures its gate from its own last value, not from an extreme, so it can step either way on any bar where price travels far enough.
ATR Trailing Regime: An ATR trailing regime ratchets a stop line in the trend's favor until breached. ATR-scaled range filters look similar, but the line is a price estimate that moves both ways, not a one-way ratchet.
EMA: An EMA moves on every bar by a fraction of price's distance from it. A range filter moves on few bars, by all of the distance beyond its threshold: still through noise, one threshold behind during trends.
Concept family
Trend
104 concepts mapped · 104 in the Library
Range Filter FAQ
Turn Range Filter into a trading strategy.
Describe your Range Filter idea to Quant. It builds the strategy with you and backtests it on real data.