How to script buy when sma 5 days crosses and sell for price crosses sma 5 days?

As per the above condition use day timeframe

Buy Script:

CROSSOVER(SMA(CLOSE,5),CLOSE)

Sell Script:

CROSSOVER(CLOSE,SMA(CLOSE,5))