MA20 Hi-Lo-Close Magic Band
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © phd16ashokp AKPHUF-PP
//@version=4

study(title="MA20 HiLoClo", shorttitle="MA20HLC Band", overlay=true)
ln = input(20, minval=1, title="Length20Lo")
sr = input(low, title="Source")
out = sma(sr, ln)
lnn = input(20, minval=1, title="Length20Hi")
srr = input(high, title="Source")
outt = sma(srr, lnn)
lnm = input(20, minval=1, title="Length20Cl")
srt = input(close, title="Source")
outtt = sma(srt, lnm)
plot(out, color=color.red, title="MA20Lo")
plot(outt, color=color.blue, title="MA20Hi")
plot(outtt, color=color.olive, title="MA20Cl")