Need code for the below Strategy

Hi,

Could you please provide the code for the below Strategy.

When candle stick complete close above SMA50 the buy signal should come.

Same way When candle stick close below SMA50 the Sell signal should code.

Also when buy signal will come the Up Mark should show on chart.

Thanks,

Anjan

As per the above condition

Buy Script:

CLOSE>SMA(CLOSE,50)

Sell Script:

CLOSE<SMA(CLOSE,50)