try this afl
// EMA Cross-315
range1=Optimize("range1",3,1,100,1);
range2=Optimize("range2",15,1,100,1);
Plot( Close, "Close", colorBlack, styleCandle );
Plot(EMA( Close,range1), "3d-ema", colorRed );
Plot(EMA( Close,range2), "15d-ema", colorBlue );
Buy = Cross(range1,range2);
Buy = Cross((Close),(EMA(Close,range1)));
Buystop = Ref(EMA(Close,range1),-1);
BuyPrice = Max(Buystop,Low);
Sell = Cross(EMA(Close,range2),(Close));
Sellstop = Ref(EMA(Close,range1),-1);
SellPrice = Min(sellstop,High);
Short = Sell;
Cover = Buy;
PlotShapes(shapeUpArrow*Buy,colorBlack);
PlotShapes(shapeDownArrow*Sell,colorRed);
GfxDrawText("EMA315", 4, 12, 350, 40);
Hi....friends do any one has the AFL code for this strategy for AMibroker...kindly post..