PADR
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Andrew_Yong

//@version=5
indicator("PADR", overlay=true)

lengthInput = input.int(14, title="Length")
smaHigh = ta.sma(high, lengthInput)
smaLow = ta.sma(low, lengthInput)

i_res = input.timeframe('D', "Resolution")
s = request.security("FCPO1!", i_res, smaHigh - smaLow)

plot(s ? s : na, style=plot.style_line, linewidth=2, color=color.rgb(0, 255, 0))