5 sma trend alert for buy or sell

Please revert the procedure to create strategy based on 5 sma

  1. when 5 sma is in uptrend it should give alert audible or visible ie arrow on hourly chart

  2. when 5 sma is in downtrend it should give alert audible or visible ie arror on hourly chart

Hi You can try this below code for alerts as per your given formula above

Buy Alert: Close > SMA(CLOSE, 5)

Sell Alert: Close < SMA(CLOSE,5)

If you are using PI then you can configure this using “create alert” option.