indicator · on price · open source
Triangular Moving Average indicator
Triangular Moving Average is a free open-source indicator by @deepwick. Triangular Moving Average (TRIMA) is an SMA of an SMA — the kernel is triangular (peaked in… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Triangular Moving Average does
Triangular Moving Average (TRIMA) is an SMA of an SMA — the kernel is triangular (peaked in the middle of the window) so it removes more noise than a single SMA at the same length.
- Smoother than a plain SMA but slower.
- Excellent S/R line for swing trading on 4h/daily.
- Raise N for very smooth swings, lower it for cleaner cycles.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Triangular Moving Average", overlay=true)
len = input.int(20, "Length", minval=2, maxval=500)
src = input.source(close, "Source")
colorNeutral = input.color("color.gray", "Color Neutral")
trima = ta.sma(ta.sma(src, len), len)
p_TRIMA = plot(trima, "TRIMA", color=colorNeutral, linewidth=2)
alertcondition(ta.crossover(close, trima), "Price crosses above TRIMA", "Price crossed above the TRIMA")
alertcondition(ta.crossunder(close, trima), "Price crosses below TRIMA", "Price crossed below the TRIMA")
No comments yet.
Sign in to comment.