Roofing Filter
By LuxAlgoMar 19, 2026
Roofing Filter runs price through Ehlers' two published stages back to back: a two-pole high-pass keyed to 48 bars removes everything slower — trend and drift — then a SuperSmoother keyed to 10 bars removes everything faster — aliasing and bar-to-bar noise. The residue plots as a zero-mean line holding only the cycle band bracketed by the two cutoffs. This pane is the roofing filter in its definitive clean form, published coefficients intact, the output colored by its sign, and a gradient fill anchoring every swing to zero.
How to Trade the Roofing Filter?
- Zero crosses: the roofed output crossing zero marks a cycle-scale swing shift — the events the two zero-cross alerts fire on.
- Turns: slope reversals flag cycle crests and troughs as they form, ahead of the next zero cross, and both carry matching alerts.
- As preprocessing: the pane's larger job is upstream hygiene. An oscillator fed the roofed series works from a zero-mean, cycle-only input, so its extremes stay meaningful even while price trends.
The intermediate high-pass stage is exposed in the data window for inspection.
Roofing Filter Settings
- Source (default close): series the filter preprocesses.
- High-Pass Period (default 48): upper cutoff of the passband — components with longer periods are stripped, keeping the output zero-mean through trends. Keep it well above the low-pass period.
- Low-Pass Period (default 10): lower cutoff — components with shorter periods are treated as noise. Squeeze the two cutoffs together and the output begins ringing.
- Gradient Fill (default enabled) and Zero-Cross Markers (default disabled); the Bullish and Bearish inputs set the two sign colors.
Frequently Asked Questions
How does this differ from using the SuperSmoother alone?
The Ehlers SuperSmoother is only the low-pass half: it removes fast noise but leaves trend and drift in place, so its output follows price. The roofing filter adds the high-pass stage in front, which is what makes the output zero-mean and cycle-scaled rather than a smoothed price line.
Why 48 and 10 bars?
They are the published defaults, sized so the passband brackets the swing lengths most oscillator work targets. The practical rule: keep the high-pass period comfortably above your target swing's length and the low-pass period below it.
Does the filter lag or miss anything?
A few bars of lag — the toll every filter pays — and deliberate blindness to everything outside the passband. Anything slower than the high-pass cutoff or faster than the low-pass cutoff is gone by design; that selectivity is the point.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
