How to write code if 1 min bar closes above previous day or below previous day low?

hElLO tRaDeR,

Comparing today's intraday candles to Yesterday's OHLC is currently not possible with Pi Scanner.

You can manually check this Realtime for 172 FnO stocks, here The FataFat Stock Scanner.