//@version=5
indicator("Supply and Demand Zones", overlay=true)
// Input parameters for length of high and low
len = input(20, title="Length for high/low")
// Detecting local highs and lows
highs = ta.highest(high, len)
lows = ta.lowest(low, len)
// Plotting supply zones (resistance) when a new local high is detected
var float supply_level = na
if (high ==...