EMA Crossover & RSI algo needed

Hi All,

Can someone share an algorithm with below condition;

  • Buy when : 5 period moving average (5 EMA) crosses 25 period moving average (25 EMA) and RSI of period 14 is greater than 55
  • Sell when : 25 period moving average (25 EMA) crosses 5 period moving average (5 EMA) and RSI of period 14 is Lesser than 45

I would like to back test this for Nifty.

Can anyone help please?