Need code in pi scanner

buy code - when candle close above 10sma and rsi 9 corssover rsi 14 in below 40 and macd crossover (12,26,9)
sell code - when candle close below in 10 sma and rsi 14 crossover rsi 9 in above 50 and macd crossover (26,12,9)

for the above given condition

Buy script:

CLOSE>SMA(CLOSE,10) AND RSI(CLOSE,14)>40 AND RSI(CLOSE,9)>40AND CROSSOVER(MACDSignal(12, 26, 9, SIMPLE), MACD(12, 26, 9, SIMPLE)) = TRUE

Sell Script:

CLOSE40 OR RSI(CLOSE,14)>50 AND RSI(CLOSE,9)>50 AND CROSSOVER( MACD(12, 26, 9, SIMPLE),MACDSignal(12, 26, 9, SIMPLE)) = TRUE

1 Like

proper not work