_SECTION_BEGIN("MA Cross");
//Modified SH's 315 Strategy by Santhosh2010
// Traderji id :Santhosh2010
e1=EMA(C,3);
e2=EMA(H,15);
e3=EMA(L,15);
Plot(e1,"",colorYellow,styleDashed |styleThick);
Plot(e2,"",colorLightYellow,styleDots );
Plot(e3,"",colorLightYellow,styleDots );
b1=Cross(e1,e2);
s1=Cross(e3,e1);
Buysetup=Flip(b1,s1);
Shortsetup=Flip(s1,b1);
trend=IIf(BarsSince(Buysetup)<BarsSince(Shortsetup ),1,0);
Col=IIf(trend==1,colorGreen,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);
Buy = b1;
Sell =s1;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
_SECTION_END();