Skip to main content

ADX with Buy and Sell for Amibroker (AFL)

HARI123 almost 16 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 3)
  • Tags:
    oscillator, trading system, amibroker

Trading in the direction of a strong trend reduces risk and increases profit potential. The average directional index (ADX) is used to determine when price is trending strongly. In many cases, it is the ultimate trend indicator. After all, the trend may be your friend, but it sure helps to know who your friends are. In this article in this article, we’ll examine the value of ADX as a trend strength indicator.

For more information click here

Screenshots

Indicator / Formula

Copy & Paste Friendly
_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);

0 comments

Leave Comment

Please login here to leave a comment.