Exponential MA Channel, Daily Timeframe (Crypto)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © memotyka9009

//@version=4
study(title="Moving Average (Exponential)", shorttitle="Channel", overlay=true, resolution="")

src = input(close, title="Source")
offset = input(title="Offset", type=input.integer, defval=0, minval=-500, maxval=500)

// define ema timeframes
ma21 = input(21, minval=1, title="Length")
ma53 = input(53, minval=1, title="Length")
ma100 = input(100, minval=1, title="Length")

// use 'ema' function to create output for each ema
out1 = ema(src, ma21)
out2 = ema(src, ma53)
out3 = ema(src, ma100)

// plot the middle channel
ema_blue = plot(out1, color=color.blue, title="MA21", offset=offset)
ema_yellow = plot(out1*1.195, color=color.yellow, title="MA21", offset=offset)
ema_orng = plot(out1*.8995, color=color.orange, title="MA21", offset=offset)

// plot the top band (green)
top1 = plot(out3*1.85, color=color.green, title="MA100", offset=offset)
top2 = plot(out3*2.5, color=color.green, title="MA100", offset=offset)

// plot the bottom band (red)
bottom1 = plot(out2*.8995, color=color.red, title="MA53", offset=offset)
bottom2 = plot(out3*.6, color=color.red, title="MA100", offset=offset)

// fill in colors between 
fill(top1, top2, color.rgb(0,200,10,88))
fill(ema_yellow, ema_orng, color.rgb(0,75,100,75))
fill(bottom1, bottom2, color.rgb(100,0,0,80))