Join our facebook group for Amibroker afl code discussion https://www.facebook.com/groups/603980776889348

ADX Indicator Amibroker afl

ADX Indicator Amibroker afl
ADX Indicator Amibroker afl

//www.aflcode.com
_SECTION_BEGIN("ADX");
range = Param("Periods", 50, 2, 200, 1 );
Plot( ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );
Plot( PDI(range), "+DI", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );
Plot( MDI(range), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );

Buy = Cross(PDI(Range), MDI(Range));
Sell= Cross(MDI(Range), PDI(Range));

PlotShapes(IIf(Buy,shapeUpTriangle,shapeNone),colorGreen,0,20,0);
PlotShapes(IIf(Sell,shapeDownTriangle,shapeNone),colorRed,0,20,0);
Previous
Next Post »