Range Filter

A price line that moves only when price travels further than its own smoothed range, so it steps in trends and goes flat in chop. How AlgoLift computes it.

IndicatorBy AlgoLiftUpdated 4 min read
On this page 11What it measuresFormulaInputs in AlgoLiftOutputs in AlgoLiftHow to read itBest in, worst inThree setups1. Trade the buy and sell signals2. Direction as a trend gate3. The filter as a trailing exitCommon mistakes

TL;DR. A line that follows price only when price moves further than a smoothed measure of its own bar-to-bar movement. In a trend it steps along behind price; in chop it goes flat. Its direction is a clean trend gate, and its buy and sell signals alternate.

What it measures

  • Whether a move is bigger than the usual noise. The filter ignores any move smaller than the smoothed range, so small back-and-forth bars leave it where it is.
  • The trend's side. The direction output reads 1 after the filter last rose and -1 after it last fell, and holds through flat bars.
  • How far price must go to move the line. The upper and lower targets sit one smoothed range either side of the filter.

Formula

Inputs in AlgoLift

SettingDefaultRangeNotes
Sampling Period1002 to 500Bars in the range average. The widely copied community setting is 100; the original listing is quoted as 15.
Range Multiplier30.1 to 20How many smoothed ranges price must move before the line follows.
SourceCloseClose, Open, High, Low, HL2, HLC3, OHLC4Which value of each bar the filter follows.

Outputs in AlgoLift

HandleTypePlottedNotes
FilterNumericAlwaysThe filter line, in price units.
Upper TargetNumericAlwaysThe filter plus one smoothed range.
Lower TargetNumericAlwaysThe filter less one smoothed range.
DirectionNumericOn select1 after the filter last rose, -1 after it last fell, 0 before its first move.
SignalNumericAlways+1 on a buy, -1 on a sell, 0 elsewhere. Drawn as markers on the chart. The first state taken is not a signal.

How to read it

  • Direction 1 and price above the filter: an up state. The line will keep stepping up as long as price keeps moving more than the range.
  • A flat filter: price is moving less than its usual range, the market is ranging, and the line is waiting.
  • A buy (+1): the first bar price pushes the filter up after a sell. A sell (-1) is the mirror. Signals always alternate, so two buys never come in a row.
  • Wide targets: a large range means volatile bars; the filter needs a bigger move before it follows.
Common Misconception
Myth
The Range Filter predicts the next move because it filters out noise.
Reality
It only describes the move that already happened. It waits for price to travel further than its usual range, so every signal comes after the move has started, and in a range the last signal can be late and wrong.

Best in, worst in

Best in markets that trend in clear legs, where the flat stretches keep you out of the chop between them.

Worst in sharp reversals: the filter needs a full range of movement the other way before it turns, so it gives back part of the move. On very short periods it follows price closely and flips often.

Three setups

1. Trade the buy and sell signals

Wire Signal into a Comparison greater than 0 for the long Entry, and less than 0 for the short entry. The signals alternate, so the strategy flips side on each one.

2. Direction as a trend gate

Compare Direction equal to 1 and AND it into another entry, for example an RSI pullback. Longs only while the filter last rose, shorts only while it last fell.

3. The filter as a trailing exit

Hold a long while price stays above Filter, and exit through Set Exit Condition when the close falls below it. The line does not move in chop, so the exit only tightens when price makes progress.

Common mistakes

  • Forgetting the warmup. At the default period the line needs 298 bars before its first value; on daily bars that is more than a year of history.
  • Reading direction as a signal. Direction is a state that holds for many bars. Use Signal when you want one trade per turn, or a Crossover on direction.
  • Tuning the multiplier finely. A rule that works at 2.8 and fails at 2.6 and 3.0 has found noise (overfitting in trading).
Key Takeaway

The Range Filter moves only on moves bigger than its own smoothed range: a trend gate that stays flat in chop, with alternating buy and sell signals.