TopImbalance = low[2] <= open[1] and high[0] >= close[1]
TopImbalancesize = low[2] - high[0]
if TopImbalance and TopImbalancesize > 0 then
drawcandle(low[2], low[2], high[0], high[0]) coloured(255,255,0)
//DrawSegment(BarIndex[2],low[2],BarIndex + 10,low[2]) coloured(5,5,0)
//DrawSegment(BarIndex[2],high[0],BarIndex + 10,high[0]) coloured(5,5,0)
drawrectangle(BarIndex[2],low[2],BarIndex + 10,high[0]) coloured(255,255,0,50) bordercolor(0,0,0,0)
endif
BottomInbalance = high[2] >= open[1] and low[0] <= close[1]
BottomInbalancesize = low[0] - high[2]
if BottomInbalance and BottomInbalancesize > 0 then
drawcandle(low[0], low[0], high[2], high[2]) coloured(255,255,0)
//DrawSegment(BarIndex[2],high[2],BarIndex + 10,high[2]) coloured(0,0,255)
//DrawSegment(BarIndex[2],low[0],BarIndex + 10,low[0]) coloured(0,0,255)
drawrectangle(BarIndex[2],high[2],BarIndex + 10,low[0]) coloured(255,255,0,50) bordercolor(0,0,0,0)
endif
return
//COLORBETWEEN(open,close,"RED")