OPEN-SOURCE SCRIPT

MultipSMMA 5-9-13-21-35-50-100 @trueenight

864
//version=4
study("MultipSMMA 5-9-13-21-35-50-100", overlay = true)
getSma(src, len) =>
float smma = 0.0000000
// len = input(7, minval=1, title="Length")
// src = input(close, title="Source")
smma := na(smma[1]) ? sma(src, len) : (smma[1] * (len - 1) + src) / len
//plot(smma, color=color.red)
smma

plot(getSma(close, input(5, "Sma 5 ")),"sma5", color=#ff0000)
plot(getSma(close, input(9, "Sma 9 ")),"sma9", color=#ff4d00)
plot(getSma(close, input(13, "Sma 13 ")),"sma13", color=#ff9800)
// plot(sma18,"sma18", color=color.green)
plot(getSma(close, input(21, "Sma 21 ")),"sma21", color=#c27ba0, linewidth=3)
plot(getSma(close, input(35, "Sma 35 ")),"sma35", color=#00ffff)
plot(getSma(close, input(50, "Sma 50 ")),"sma50", color=#ff00ff, linewidth=3)
plot(getSma(close, input(100, "Sma 100 ")),"sma100", color=color.yellow, linewidth=3)

Exención de responsabilidad

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.