Advertisement
//@version=5
indicator(title='', overlay=true)
length1 = input.int(title='EMA length 1', defval=5, step=1)
length2 = input.int(title='EMA length 2', defval=9, step=1)
length3 = input.int(title='EMA length 3', defval=20, step=1)
length4 = input.int(title='EMA length 4', defval=50, step=1)
length5 = input.int(title='SMA length', defval=100, step=1)
length6 = input.int(title='SMA length', defval=200, step=1)
ema1 = ta.ema(close, length1)
ema2 = ta.ema(close, length2)
ema3 = ta.ema(close, length3)
ema4 = ta.ema(close, length4)
sma1 = ta.sma(close, length5)
sma2 = ta.sma(close, length6)
plot(ema1, color=color.rgb(73, 82, 80, 26), linewidth=1, title='5')
plot(ema2, color=color.rgb(211, 84, 90, 3), linewidth=1, title='9')
plot(ema3, color=color.rgb(219, 216, 14), title='20')
plot(ema4, color=color.new(color.purple, 0), linewidth=1, title='50')
plot(sma1, color=color.new(color.red, 0), title='S100')
plot(sma2, color=color.rgb(37, 32, 87), linewidth=1, title='S200')
plot(ta.vwap, color=ta.rising(ta.vwap, 2) ? color.rgb(47, 104, 47) : color.rgb(236, 46, 12, 5), linewidth=1, title='VWAP')
//@version=5
indicator(title='', overlay=true)
length1 = input.int(title='EMA length 1', defval=5, step=1)
length2 = input.int(title='EMA length 2', defval=9, step=1)
length3 = input.int(title='EMA length 3', defval=20, step=1)
length4 = input.int(title='EMA length 4', defval=50, step=1)
length5 = input.int(title='SMA length', defval=100, step=1)
length6 = input.int(title='SMA length', defval=200, step=1)
ema1 = ta.ema(close, length1)
ema2 = ta.ema(close, length2)
ema3 = ta.ema(close, length3)
ema4 = ta.ema(close, length4)
sma1 = ta.sma(close, length5)
sma2 = ta.sma(close, length6)
plot(ema1, color=color.rgb(73, 82, 80, 26), linewidth=1, title='5')
plot(ema2, color=color.rgb(211, 84, 90, 3), linewidth=1, title='9')
plot(ema3, color=color.rgb(219, 216, 14), title='20')
plot(ema4, color=color.new(color.purple, 0), linewidth=1, title='50')
plot(sma1, color=color.new(color.red, 0), title='S100')
plot(sma2, color=color.rgb(37, 32, 87), linewidth=1, title='S200')
plot(ta.vwap, color=ta.rising(ta.vwap, 2) ? color.rgb(47, 104, 47) : color.rgb(236, 46, 12, 5), linewidth=1, title='VWAP')