Professional Documents
Culture Documents
// ADX/DMI Indicator
range = Param("Periods", 14, 2, 200, 1 );
Plot( ad = ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ),
ParamStyle("ADX style", styleThick ) );
Plot( pd = PDI(range), "+DI", ParamColor( "+DI color", colorGreen ),
ParamStyle("+DI style") );
Plot( md = MDI(range), "-DI", ParamColor( "-DI color", colorRed ), ParamStyle("-DI
style") );
printf("Directional movement:\n");
printf("\nPlus directional movement index line (+DI) is currently "+
WriteIf( pd > md,"above", "below")+
" minus directional movement index (-DI)");
WriteIf( bs < 4,
"Wilder, however, suggest to qualify simple +DI/-DI crossover with 'extreme point
rule'. When the +DI rises above the -DI, the extreme price is the high price on the
day the lines cross. When the +DI falls below the -DI, the extreme price is the low
price on the day the lines cross. The extreme point is then used as a trigger point
at which you should implement the trade.\n","")+
WriteIf( bs < 4, "Current extreme point value is " +
WriteVal( ep ) + "." +
WriteIf( good, " Since today's " +
WriteIf( pd > md,
"high ("+WriteVal( High ) +") is higher",
"low ("+WriteVal(Low)+") is lower" ) +
" than extreme point so the rule is fulfilled and " +
WriteIf( pd > md, "buy","sell")+
" signal is confirmed.\n",
"Until now this rule is NOT fulfilled, so it is suggested to wait for the
confirmation.\n"),""));
printf("\nTrend strength:\n");
_SECTION_BEGIN("ADX Indicator");
//Trend Following Systems DO NOT work when ADX is Below 20 - Tech Analysis A-Z;
page 120
P1 = Param("Period",14,0,100,1);
Title=Name()+ " " + Date() + " Price: " + C + EncodeColor(colorIndigo) +" ADX" +
WriteVal( MyADX )+ EncodeColor(colorBlue) + " +DMI" + WriteVal( MyPDI )+
EncodeColor(colorRed) + " -DMI" + WriteVal( MyMDI );
_SECTION_END();