indicator · on price · open source
Smoothed Moving Average indicator
Smoothed Moving Average is a free open-source indicator. Smoothed Moving Average (SMMA) is Wilder's smoothed average: each bar's value is the… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Smoothed Moving Average does
Smoothed Moving Average (SMMA) is Wilder's smoothed average: each bar's value is the previous bar's value plus a fraction of the change. Seeded from an SMA, it converges faster than a triangular MA at very long lengths.
- Very smooth line, great for the slow leg of long-term crossovers.
- The kernel inside ATR and several other Wilder indicators.
- Raise N for ultra-smooth swings; lower it for faster adaptation.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Smoothed Moving Average", overlay=true)
len = input.int(14, "Length", minval=1, maxval=500)
src = input.source(close, "Source")
colorDim = input.color("color.maroon", "Color Dim")
var float smma = 0.0
smma := ta.sma(src, len)[1]
smma := nz(smma[1]) + (src - nz(smma[1])) / len
p_SMMA = plot(smma, "SMMA", color=colorDim, linewidth=2)
alertcondition(ta.crossover(close, smma), "Price crosses above SMMA", "Price crossed above the SMMA")
alertcondition(ta.crossunder(close, smma), "Price crosses below SMMA", "Price crossed below the SMMA")
No comments yet.
Sign in to comment.