Moving Average Channel
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © viewer405

//@version=5
indicator("Moving Average Channel", shorttitle="MAC", overlay=true)
uLength = input.int(10, "Upper MAC Length", minval=1, step=1)
lLength = input.int(8, "Lower MAC Length", minval=1, step=1)

upper = ta.sma(high, uLength)
lower = ta.sma(low, lLength)

upperPlot = plot(upper, title="Upper MA Channel", color=color.green)
lowerPlot = plot(lower, title="Lower MA Channel", color=color.red)

fill(upperPlot, lowerPlot, color=color.new(color.blue, 95), title="MAC Ribbon")