Pi scanner not generating results in backtesting

Hi,
I want to test the below strategy in Pi. I have written a code for it, but while backtesting, I am getting error, script generated no trade.

Below is the logic:-

Buy:-
Two 5 min green candles, close of 2nd candle is above close of 1st candle. 1st green candle closed above 50 period EMA along with RSI (14) > 50 & adx(14) > 25

REF(CLOSE,1) > REF(OPEN,1)  AND
REF(CLOSE,2) > REF(OPEN,2)  AND
REF(CLOSE,2) > REF(CLOSE,1) AND
CROSSOVER(REF(CLOSE,1),EMA(CLOSE,50)) AND
RSI(CLOSE,14) > 50 AND
ADX(14)>25 

Sell:- Reverse logic as buy:-

REF(CLOSE,1) < REF(OPEN,1)  AND
REF(CLOSE,2) < REF(OPEN,2)  AND
REF(CLOSE,2) < REF(CLOSE,1) AND
CROSSOVER(REF(CLOSE,1),EMA(CLOSE,50)) AND
RSI(CLOSE,14) > 50 AND
ADX(14)>25

Can someone please help.
TIA

click on edit scanner code and make sure proper spaces added between the scrip.

U mean to say the code overrall written is ok ??

the code seems fine as no syntax error

made some changes to the logic. Now I am looking for stocks for which i want to know when the heiken ashi crossover/below EMA 50. rest i will deal manually.

But this is not working too

BUY:-

SET HAC = (OPEN+LOW+HIGH+CLOSE)/4
SET HAO = (REF(OPEN,1)+REF(CLOSE,1))/2
HAC>HAO AND TREND(HAC)=UP AND CROSSOVER(HAC,EMA(CLOSE,50)) = TRUE

SELL:-
SET HAC = (OPEN+LOW+HIGH+CLOSE)/4
SET HAO = (REF(OPEN,1)+REF(CLOSE,1))/2
HAC<HAO AND TREND(HAC)=DOWN AND CROSSOVER(EMA(CLOSE,50),HAC) = TRUE