Afl help needed

#1
please, experts and senior members code these conditions for amibroker -

condition 1 -
cover & buy - when di+ > di- , cci>100 and adx>15

condition 2 -
sell & short - when di- > di+ , cci<-100 and adx>15
 
Last edited:

johnnypareek

Well-Known Member
#2
hi,

HTML:
_SECTION_BEGIN("Price");

GraphXSpace=5;
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

_SECTION_END();
p=9;
Buy=PDI(p)>MDI(p) AND CCI(p)>100 AND ADX(p)>15;
Sell=PDI(p)<MDI(p) AND CCI(p)< -100 AND ADX(p)>15;
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);

PlotShapes(IIf(Buy, shapeUpTriangle, shapeNone),colorGreen, 0,L, Offset=-12);
                PlotShapes(IIf(Sell, shapeDownTriangle, shapeNone),colorRed, 0,H, Offset=-12);
 

Similar threads