High/Low Indicator
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © lazy_capitalist

//@version=5
indicator("High/Low Indicator", overlay=true)

highGroup = "High Settings"
highSource              = input.source( title="High Source",            defval=high,    group=highGroup)
highLookbackInput       = input.int(    title="High Lookback Period",   defval=28,      group=highGroup)

lowGroup = "Low Settings"
lowSource               = input.source( title="Low Source",             defval=low,     group=lowGroup)
lowLookbackInput        = input.int(    title="Low Lookback Period",    defval=55,      group=lowGroup)

// #################### [ Technicals ] #####################

highest     = ta.highest(highSource, highLookbackInput)
lowest      = ta.lowest(lowSource, lowLookbackInput)

// #################### [ Plots ] #####################

plot(   title="High",   series=highest,     color=color.green)
plot(   title="Low",    series=lowest,      color=color.red)
