Need target and stoploss like msg board for this afl

#1
EntrySignal = C > ( LLV( L, 20 ) + 2 * ATR( 10 ) );
ExitSignal = C < ( HHV( H, 20 ) - 2 * ATR( 10 ) );
Color = IIf( EntrySignal, colorLime, IIf( ExitSignal, colorRed, colorGrey50 ));
Plot( C, "Price", Color, styleCandle | styleThick );





AvgFast=EMA( Close, 9 );
AvgSlow=EMA( Close, 26 );

myPDI=PDI (14); //Plus Directional Movement Indicator

myMDI=MDI (14); //Minus Directional Movement Indicator

myADX=ADX (14);

Plot(AvgFast,"AvgFast",colorBlack, styleLine|styleDashed | styleThick);
Plot(AvgSlow,"AvgFast",colorGreen, styleLine|styleDashed | styleThick);
//Plot(myPDI,"myPDI",colorBlue, styleLine|styleLine|styleOwnScale);
//Plot(myMDI,"myMDI",colorRed, styleLine|styleLine|styleOwnScale);
//Plot(myADX,"myADX",colorBlue, styleLine | styleThick|styleOwnScale);


//entry Criteria Long
//CrLo1=Cross( AvgFast, AvgSlow); //EMA9 has crossed over EMA26

CrLo1= AvgFast> AvgSlow; //EMA9 has crossed over EMA26
CrLo2=myPDI >= 25; //DI+ >= 25
CrLo3=myADX >= 20 AND myADX <=35; //ADX >= should be 20 to 35
CrLo4=myADX > myMDI AND myADX < myPDI; //ADX is in between DI+ and DI-

//ShortCriteria Long
//CrLo5=Cross( AvgSlow, AvgFast); //EMA26 has crossed over EMA9

CrLo5= AvgSlow> AvgFast; //EMA26 has crossed over EMA9
CrLo6=myMDI >= 25; //DI- >= 25
CrLo7=myADX >= 20 AND myADX <=35; //ADX >= should be 20 to 35
CrLo8=myADX > myPDI AND myADX < myMDI; //ADX is in between DI+ and DI-



Buy=CrLo1 AND CrLo2 AND CrLo3 AND CrLo4;
Sell=AvgSlow>AvgFast AND myMDI>myPDI;
Short=CrLo5 AND CrLo6 AND CrLo7 AND CrLo8;
Cover=AvgSlow<AvgFast AND myMDI<myPDI;


Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Short=ExRem(Short,Cover);
Cover=ExRem(Cover,Short);
PlotShapes(Buy * shapeUpTriangle,colorGreen, 0,L, Offset=-10);
PlotShapes(Short * shapeDownTriangle,colorRed, 0,H, Offset=-10);
PlotShapes(Cover * shapeHollowUpArrow,colorGreen, 0,L, Offset=-10);
PlotShapes(Sell * shapeHollowDownArrow,colorRed, 0,H, Offset=-10);

_SECTION_END();
 

Similar threads

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?