Hello,
Need help to script the following intraday scanner in pi
candle time frame: 5min
for first 2 candles starting from 9:15am to 9:25am
looking for 1) GREEN-GREEN 2) GREEN-RED OR RED-GREEN
tried with
SET A = IF(REF(CLOSE,2)>REF(OPEN,2), 1, 0)
SET B = IF(REF(CLOSE,1)>REF(OPEN,1), 1, 0)
SET C = A+B
#SCANNER 1 : FOR GREEN-GREEN
IF(C=2, 1, 0)
#SCANNER 2 : FOR GREEN-RED OR RED-GREEN
IF(C=1, 1, 0)
tried but showing an error
please correct it
thanks