Buy script need advise

I used the following code to buy. Is this correct or need correction? TREND not working.

SOPK(9,3,9,SIMPLE) > 25 AND RSI(Close,14) > 45 AND TREND(EMA(CLOSE, 20), 15) = UP AND TREND(MACD(13, 26, 9, SIMPLE), 5) = UP