indicator · on price · open source

Ehlers Roofing Filter

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Ehlers Roofing Filter — bandpasses price through a high-pass then a low-pass; only the actionable cycle survives. Strip away trend and noise to see the pure swing.

  • Plot close over the filter; trade only in the direction of the filter slope.

Source code

//@version=5
indicator("Ehlers Roofing Filter", overlay=true)
len = input.int(20, "Length", minval=5, maxval=100)
hp = (ta.highest(high, len) + ta.lowest(low, len)) / 2
rf = ta.rma(hp - ta.rma(hp, 10), len)
p_Roofing = plot(rf, "Roofing", color=color.blue, linewidth=2)
alertcondition(rf > rf[1], "Roofing rising", "Ehlers roofing filter slope turned up")
alertcondition(rf < rf[1], "Roofing falling", "Ehlers roofing filter slope turned down")

Comments

No comments yet.

Sign in to comment.