Identifies Wide Range Body ( WRB ) and Hidden Gap (HG) bars. You might need to bring Indicator visibility order over the price series (from Objects Tree window). Otherwise if you use it may get hidden behind candles.
study("WRBHG", overlay=true) body = abs(open-close) wrb = body>body and body>body and body>body ? avg(open,close) : na hg = (wrb and (low>high or high<low))? wrb : na plot(hg, title='HG', linewidth=4, color=black, offset=-1, style=circles) plot(wrb, title='WRB', linewidth=2, color=aqua, style=circles)