Range Filter Buy and Sell 5min - guikroth version

Published on MillionChart by ForexWolf.

This is a republished copy of the popular guikroth version of the Range Filter Buy and Sell indicator for the 5-minute chart. It stays true to that version's calculations, default settings and code comments, with an update to the latest script version, small styling changes and an added all-in-one buy-or-sell alert.

What the Range Filter does:
- It filters out small price moves to give a clearer view of the trend, applying a QQE-style volatility filter directly to price instead of to a smoothed RSI.
- A smoothed average price range is calculated and multiplied by a chosen amount.
- The filter only moves when price travels beyond that range, and the target ranges are drawn to show where movement would be triggered.
- Bar colours follow the filtered price trend.

Inputs:
- Source, sampling period and range multiplier.
- Other indicators on the chart, such as VWAP or an EMA, can also be used as the source.

Signals:
- Buy and sell signals and alerts are based on the Range Filter colour change.

Uses:
- Trend direction, range detection, breakout timing or reversal entries, and it is easy to combine with other strategies.

Credits:
- Original Range Filter [DW] by DonovanWall.
- The simplified version by guikroth.