Skip to main content

ADX color side way for Amibroker (AFL)

four7 almost 16 years ago Amibroker (AFL)

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

Standard ADX indicator with buy, sell and exploration. When ADX is less then 20 it is filled with yellow which means the trend is sideways.

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("ADX");
range = Param("Periods", 13, 2, 200, 1 );
Plot( ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) );
r = ADX(range);
PlotOHLC( r,r,22.5,r, "", IIf( r > 22.5, colorRed, colorYellow ), styleCloud | styleClipMinMax, 20, 45 ); 
Plot( T =PDI(range), "+DI", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") );
Plot( G = MDI(range), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") );
Buy = Cross (T,G) AND ADX(13)>20;
Sell = Cross (G,T) AND ADX(13)>20;
//Sideway = Cross(20,ADX(13);
//Canhbao = Cross(45;ADX(13);
Filter=Buy OR Sell; //OR Sideway OR Canhbao;
Buy=ExRem(Buy,Sell); Sell=ExRem(Sell,Buy); //Sideway = ExRem(Sideway,Canhbao);
AddColumn(Close,"Close");AddColumn(Volume,"Volume");AddColumn(T,"DI+");AddColumn(G,"DI-");AddColumn(ADX(13),"ADX"); AddColumn(Buy,"Buy"); AddColumn(Sell,"sell"); 

_SECTION_END();

0 comments

Leave Comment

Please login here to leave a comment.