Simple and Exponential Moving Averages (20, 50, 200)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ayejay_

//@version=5
indicator('Simple and Exponential Moving Averages', 'SMA(20, 50, 200) EMA(20, 50, 200)', overlay=true)

SMA20 = ta.sma(close, 20)
SMA50 = ta.sma(close, 50)
SMA200 = ta.sma(close, 200)

EMA20 = ta.ema(close, 20)
EMA50 = ta.ema(close, 50)
EMA200 = ta.ema(close, 200)

plot(SMA20, color=color.new(color.red, 0), title='SMA(20)')
plot(SMA50, color=color.new(color.orange, 0), title='SMA(50)')
plot(SMA200, color=color.new(color.yellow, 0), title='SMA(200)')

plot(EMA20, color=color.new(color.green, 0), title='EMA(20)')
plot(EMA50, color=color.new(color.blue, 0), title='EMA(50)')
plot(EMA200, color=color.new(color.purple, 0), title='EMA(200)')

