Total Percent Movement
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © developerjoe

//@version=5
indicator("Total Percent Movement")
baseline = input(2, "Baseline")
maInterval = input(55, "MA Interval")

gain = ((high - low)/low)*100

plot(gain, title="Movement")
plot(baseline, color=color.green, title="Baseline")
plot(ta.sma(gain, maInterval), color=color.purple, title="Moving Average")
