Identify Inside Bar in Zerodha Pi

I am looking for a Zerodha Pi scanner for identifying Inside Bar candles i.e. a candle whose O,H,L and C lies within the candle preceding that.

(REF(HIGH,1) < REF(CLOSE,2) AND 
REF(LOW,1) > REF(OPEN,2) OR 
(REF(HIGH,1) < REF(OPEN,2) AND 
REF(LOW,1) > REF(CLOSE,2)