indicator · on price · open source
Ehlers BandPass Filter indicator
Ehlers BandPass Filter is a free open-source indicator by @deepwick. Ehlers BandPass Filter — a 2-pole bandpass that isolates a specific cycle band in the price… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Ehlers BandPass Filter does
Ehlers BandPass Filter — a 2-pole bandpass that isolates a specific cycle band in the price series. Great for cycle traders who want to see just the swing component, not the noise.
- Center the passband by adjusting
len(period in bars). - Buy dips near the lower envelope, sell near the upper.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Ehlers BandPass Filter", overlay=true)
len = input.int(20, "Period", minval=5, maxval=100)
colorMid = input.color("color.orange", "Color Mid")
colorNeutral = input.color("color.gray", "Color Neutral")
src = close - close[7]
var float bp = 0.0
bp := 0.5 * src - 0.5 * src[2] + 0.84 * (nz(bp[1]) + nz(bp[3]))
hline(0, "Zero", color=colorNeutral)
p_BandPass = plot(bp, "BandPass", color=colorMid, linewidth=2)
alertcondition(ta.crossover(bp, 0), "Cycle up", "BandPass crossed above zero")
alertcondition(ta.crossunder(bp, 0), "Cycle down", "BandPass crossed below zero")
No comments yet.
Sign in to comment.