RSI is above 60 for buy and below 40 for sell. AND

ADX is above 25 level.

Can anyone guide me if this is a right code or not ? Thanks.

Buy- CROSSOVER(MACD(12,26,9,EXPONENTIAL),MACDSIGNAL(12,26,9,EXPONENTIAL)) AND RSI(CLOSE,14)>60 AND TREND(CLOSE,55)=UP AND ADX(14)> 25
Sell- CROSSOVER(MACD(12,26,9,EXPONENTIAL),MACDSIGNAL(12,26,9,EXPONENTIAL)) AND RSI(CLOSE,14)<40 AND TREND(CLOSE,45)=DOWN AND ADX(14) > 25

Sir,
I want to scan the stocks which fulfills the above criteria and in addition I want to add one more term that when price is above 20 DMA. Can you please help me with that ??? Thanks.
I mean I want to apply above code in Pi Scanner.
Pls guide me regarding that.