ADX ADJUSTABLE SCANNER for Amibroker (AFL)
manojvarma almost 9 years ago Amibroker (AFL)
This can be used for determining the trend of all the stocks present in the watch list by providing with the custom parameters like adx value (20,25,30,40,….) of the under lying stock in the required time frames.
Best settings are adx>30 with [parabolic sar] indicating buy side on daily time frame and also can be used on hourly charts also and works good on commodities.
Indicator / Formula
/*
FILTER IS 14 PERIOD ADX ABOVE 40
UPTREND = 1 MEANS YOUR UPTREND CONDITION
DOWNTREND = 1 MEANS YOUR DOWNTREND CONDITION
IF BOTH ARE ZEROS MEANS ONLY 14 PERIOD ADX ABOVE 40 IS SATISFIED
HERE PR = PERIOD OF ADX SO IF YOU WANT TO CHANG YOU CAN CHANGE THE PR VALUE
AV IS ADX VALUE.SO YOU CAN CHANE AV FOR ADJUSTING ADX VALUE
*/
AV =40;
PR = 14;
A = PDI(PR) < 20 ;
B = MDI(PR) < 20 ;
E = ADX(PR) > AV;
P = PDI(PR) ;
Q = MDI(PR);
HL = P > Q;
LH = Q > P;
F = ADX(PR);
X = E AND HL AND B ;
Y = (E == 1)AND (LH ==1) AND (A ==1) ;
//Filter = (X== 1) OR (Y == 1);
Filter = E == 1;
//AddColumn(HI,"H",1,colorDefault );
//AddColumn(LW,"L",1,colorDefault);
AddColumn(F,"14PERIOD",1.2,colorWhite,colorBlue);
AddColumn(X,"UPTREND",1.2,colorWhite,colorDarkGreen);
AddColumn(Y,"DOWNTREND",1.2,colorWhite,colorRed);
AddColumn(P,"POSITIVE",1.2,colorWhite,colorGreen);
AddColumn(Q,"NEGATIVE",1.2,colorWhite,colorRed);0 comments
Leave Comment
Please login here to leave a comment.