indicator · on price · open source
Modular Filter indicator
Modular Filter is a free open-source indicator by @deepwick. Modular Filter is the simplest single-pole low-pass smoother: each bar is the previous… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Modular Filter does
Modular Filter is the simplest single-pole low-pass smoother: each bar is the previous output plus half the change from price. Cute for showing how a moving-average kernel works — and surprisingly useful on highly smoothed inputs.
- Cutoff is fixed; treat it as a learning toy or sanity baseline.
- Great for visualizing the gap-filler problem an EMA solves.
- Not recommended for production signals.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Modular Filter", overlay=true)
src = input.source(close, "Source")
k = input.float(0.5, "Blend rate", minval=0.01, maxval=1, step=0.05)
colorNeutral = input.color("color.gray", "Color Neutral")
var float mf = 0.0
mf := nz(mf[1], src) + (src - nz(mf[1], src)) * k
p_Modular = plot(mf, "Modular", color=colorNeutral, linewidth=2)
alertcondition(ta.crossover(close, mf), "Price crosses above Modular", "Price crossed above the modular filter")
alertcondition(ta.crossunder(close, mf), "Price crosses below Modular", "Price crossed below the modular filter")
No comments yet.
Sign in to comment.