Need codes for my strategy

ema crossever strategy-

buy signal-ema 5 crossover ema 15 for 5 mins candle stick.

sell signal-vise versa

Please find the Amibroker AFL code for your requirement.

**Note : To avoid false cross over triggers, this code checks for cross over in previous candle



ema5 = ema(close,5);
ema15 = ema(close,15);

Buy = cross(Ref(ema5,-1), Ref(ema15,-1));
Sell= cross(Ref(ema15,-1), Ref(ema5,-1));