Please provide me the code for following strategy

Exact strategy-

TImeframe -Hourly nifty charts

Buy- If a green candle breaches 10 ema for that hour from downside and MACD crossover is there and histogram above zero

Exit buy script on minimal 50 pts profit

Sell- If a red candle breaches 10 EMA for that hour from upside and MACD crossover is there and histogram below zero

Exit sell on minimal 50 points profit

As per the above given condition

Buy Script:

SET A = REF(CLOSE,1)>REF(OPEN,1)
EMA(CLOSE,10)>A AND
CROSSOVER(EMA(CLOSE,10),MACD(13, 26, 9, SIMPLE))
AND MACD(13, 26, 9, SIMPLE) > 0

Sell Script:

SET A = REF(OPEN,1)>REF(CLOSE,1)
EMA(CLOSE,10)>A AND
CROSSOVER(MACD(13, 26, 9, SIMPLE),EMA(CLOSE,10))
AND MACD(13, 26, 9, SIMPLE) < 0

awaiting for the answer to my query…