DW Range Filter (B&S Signals)


Hidden Redirect Link
Loading...

DW Range Filter

VuManChu Swing Free indicator port
VuManChu Swing Free indicator port

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.

How the Range Filter works

  1. Range size. Average volatility is measured as a double-smoothed EMA of the absolute bar-to-bar change of the source: an EMA of length n (Swing Period), smoothed again with length 2n − 1, then multiplied by the Swing Multiplier.
  2. Filter line. The filter moves only when price exceeds the previous filter value by more than the range size. Price above range → filter steps up to price − range. Price below range → filter steps down to price + range. Otherwise the line holds flat.
  3. Direction and signals. The filter's slope defines trend direction; during flat sections the last direction is kept. A BUY prints when price trades above a rising filter, a SELL when price trades below a falling filter. A built-in state machine enforces strict alternation — never two consecutive BUYs or two consecutive SELLs.

What appears on your chart

  • Stepped filter line colored by trend: teal (uptrend), pink (downtrend), gray (neutral)
  • Semi-transparent high/low band fills showing the active noise range around the filter
  • BUY labels below the signal bar, SELL labels above it
  • Optional candle coloring by trend direction and bar momentum (off by default)

Inputs and default settings

  • Swing Source (Close) — price series used in all calculations
  • Swing Period (20) — EMA length of the average range; higher values produce a smoother filter and fewer signals
  • Swing Multiplier (3.5) — scales the range width; higher values ignore more noise and signal later
  • Bar Colors On/Off (off) — enables trend/momentum candle coloring

Exact signal rules

  • BUY: source above the filter, filter direction up, source changed versus the previous bar, and the most recent signal was a SELL.
  • SELL: source below the filter, filter direction down, source changed versus the previous bar, and the most recent signal was a BUY.

FAQ

Does it repaint?

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.

What markets and timeframes does it support?

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.

How is it different from a moving average crossover?

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.

How do I reduce false signals?

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.

Origin, credits, and license

VuManChu Swing Free indicator

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.

© Licensed under MIT

Comments

loading