Bar Overlap - Sort of inside bars
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © callmejaytrader

//@version=5
indicator("Bar Overlap")
overlapAmount = math.max(0,math.min(high, high[1]) - math.max(low, low[1]))
barAmount = high - low 
overlap = overlapAmount /barAmount
averageOverlap = ta.sma(overlap, 10)
plot(overlap)
hline(0.5)
hline(0.1)
hline(0.9)
