
DW Range Filter (B&S Signals) is a trend-following overlay indicator that filters out market noise and prints alternating BUY and SELL labels when price breaks out of a volatility-adjusted range. It is a native Indie port of the Range Filter concept by DonovanWall (the widely used "Buy & Sell Signals" community edition from Pine Script), rebuilt for the TakeProfit platform with bar-by-bar parity to the original calculation — including Pine-exact EMA seeding.
Instead of following every tick like a moving average, the filter line holds flat while price chops inside its range and only steps up or down when price moves further than average volatility allows. The result: flat line in sideways markets, clean directional steps in trends, and unambiguous entry/exit labels.
price − range. Price below range → filter steps down to price + range. Otherwise the line holds flat.No. Historical signals never repaint and no future data is used. On the live bar the label tracks the current price until the bar closes, then becomes final — identical to the original Pine Script behavior.
Any symbol and timeframe on TakeProfit: crypto (BTC, ETH, altcoins), stocks, forex, futures, and indices. The defaults (20 / 3.5) are a general-purpose starting point; raise the Swing Multiplier or Swing Period on noisy low timeframes, lower them for slower markets.
A moving average moves on every bar, so it whipsaws in ranges. The Range Filter requires price to beat a volatility threshold before the line moves at all, which suppresses false signals in sideways conditions and keeps signals directional in trends.
Increase the Swing Multiplier (wider range, later but cleaner signals), increase the Swing Period (smoother volatility estimate), or use the labels as a confluence filter alongside support/resistance, volume, or higher-timeframe trend rather than as standalone entries.
Based on the Range Filter study by DonovanWall and the community "Buy & Sell Signals" Pine Script v4 edition. Ported line-by-line to the Indie language for TakeProfit; the port reproduces Pine's ema() seeding and the original threshold, direction, and signal-alternation logic exactly. Original source code is licensed under the Mozilla Public License 2.0.
This indicator is a technical analysis tool for educational and informational purposes. It is not financial advice, and signals do not guarantee outcomes. Always test settings on your market and manage risk.
Comments