Code for Pi-scanner

code required for pi-scanner;-

when color of candle(Heikin Ashi) change from red to green or green to red in any time frame.

TRADESCRIPT CODE FOR ZERODHA PI SCANNER:

SET A = ((OPEN + HIGH + LOW + CLOSE) / 4)  AND 
REF(A,3) < REF(A,4) AND 
REF(A,2) < REF(A,3) AND 
REF(A,1) > REF(A,2)