MultipSMMA 5-9-13-21-35-50-100 @trueenight
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © volkyyy06
//@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)