Need code for my Strategy - Combination of EMA, Stochatics, MACD

Dear Experts,

Kindly provide a code for below strategy.

Buy:

EMA crossover of 5 / 20, Stochatics (5,3,3) - in bullish crossover and MACD (12,26,9) - in bullish crossover

Sell:

EMA crossover of 20 / 5, Stochatics (5,3,3) - in bearish crossover and MACD (12,26,9) - in bearish crossover

hereby, I have attach example chart for your reference.


For the above query

Buy Script:

SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
CROSSOVER(EMA(CLOSE,5),EMA(CLOSE,20)) AND SOPK(5, 3, 3, SIMPLE) > 80 OR SOPD(5, 3, 3, SIMPLE) > 80 AND CROSSOVER(A, B) = TRUE 

Sell Script:

SET A = MACDSignal(13, 26, 9, SIMPLE)
SET B = MACD(13, 26, 9, SIMPLE)
CROSSOVER(EMA(CLOSE,20),EMA(CLOSE,5)) AND SOPK(5, 3, 3, SIMPLE) <20 OR SOPD(5, 3, 3, SIMPLE) < 20 AND CROSSOVER(B, A) = TRUE 

thank u i will try those other indicators ,and see how it can help me

Dear AlgoGeek,
Thanks for answer. I am getting error while using in Backtest and scanner. so please kindly review the error and give me the new code brother…

check with more historical data and try the code is correct

Sir can you please provide me this strategy in AFL code.

I would be very thank full to you.

Regards,
Ravindra