Please help me Add buy and sell signal setup for robo trade in this afl

#1
Please help me
Add buy and sell signal setup for robo trade in this afl





_SECTION_BEGIN("MA Cross");

//Modified SH's 315 Strategy by Santhosh2010
// Traderji id :Santhosh2010

e1=EMA(C,5);
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,colorBrightGreen,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);

_SECTION_END();

grid_day = Day()!=Ref(Day(),-1);
Plot(grid_day,"",colorLightGrey,styleHistogram|styleDots|styleNoLabel|styleOwnScale);
 

Attachments

#2
Enjoy !!

Code:
_SECTION_BEGIN("MA Cross");

//Modified SH's 315 Strategy by Santhosh2010
// Traderji id :Santhosh2010
// Updated by Traderji id:Sudhagar Rajaraman

e1=EMA(C,5);
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,colorBrightGreen,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);

//Buy = IIf(trend==1,0,4);


Buy = IIf(trend==0,0,4);
Sell = IIf(trend==1,0,4);
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
Short = Sell;
Cover = Buy;

/* Plot Buy and Sell Signal Arrows */
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
/* Plot Buy and Sell Signal Arrows */
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);
GraphXSpace = 5;


_SECTION_END();

grid_day = Day()!=Ref(Day(),-1);
Plot(grid_day,"",colorLightGrey,styleHistogram|styleDots|styleNoLabel|styleOwnScale);
 

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Name:Phone:
Email:City:
State:
Are you a day trader?