I'm trying to get the background color to cover both candle, but I've been struggling to do this. Does anyone have a clue?
If you look at the below image, I am looking for the blue background to cover both candle of the IB and OB and yellow for OB and IB, but only can get it to cover one. Much appreciated for any help.
showiobar = input.bool(true, 'Show Outside + Inside Bar Signal')
showiolabels = input.bool(true, 'Show I/O Bar Labels')
// Bar Signals
ibar = high <= high[1] and low >= low[1]
obar = high > high[1] and low < low[1]
// Inside Bar
barcolor(ibar ? color.yellow : na, title='Inside Candle')
plotshape(ibar and showiolabels, title='Inside Bar', location=location.abovebar, color=color.new(color.yellow, 20), style=shape.labeldown, size=size.tiny, textcolor=color.black, text='IB')
// Outside Bar
barcolor(obar ? color.white : na, title='Outside Bar')
plotshape(obar and showiolabels, title='Outside Bar', location=location.belowbar, color=color.new(color.white, 20), style=shape.labelup, size=size.tiny, textcolor=color.black, text='OB')
// Inside Bar + Outside Bar Signal
bgcolor(showoibar and obar and ibar[1] ? color.new(color.blue, 75) : na, title = 'Inside Bar + Outside Bar')
// Outside Bar + Inside Bar Signal
bgcolor(showiobar and ibar and obar[1] ? color.new(color.yellow, 75) : na, title = 'Outside Bar + Inside Bar')