ADX Explorer for Amibroker (AFL)
_SECTION_BEGIN("ADX");
range = Param("ADX Periods", 7, 2, 200, 1 );
Col_adx = IIf(ADX(range) > Ref(ADX(range),-1) AND ADX(range) > 30,colorBlue, colorGrey40);
Col_pdi = IIf(PDI(range) > MDI(range) AND PDI(range) > 30,colorBrightGreen,colorDarkGreen);
Col_Mdi = IIf(MDI(range) > PDI(range) AND MDI(range) > 30,colorRed,colorDarkRed);
Plot( ADX(range), _DEFAULT_NAME(), Col_adx , ParamStyle("ADX style", styleThick ) );
Plot( PDI(range), "+DI", Col_pdi, ParamStyle("+DI style") );
Plot( MDI(range), "-DI", Col_mdi, ParamStyle("-DI style") );
Plot (20,"",colorGrey40);
Plot (30,"",colorWhite);
trend = IIf(Col_adx ==colorBlue AND Col_pdi==colorBrightGreen,colorBrightGreen,IIf(Col_adx ==colorBlue AND Col_mdi==colorRed,colorRed,IIf(Col_pdi == colorBrightGreen AND Col_mdi == colorRed,colorYellow, IIf(Col_pdi==colorBrightGreen,colorDarkGreen,IIf(Col_mdi==colorRed,colorDarkRed,colorBlack)))));
trend = IIf(MDI(range) > PDI(range) AND MDI(range) > 30,colorRed,IIf(PDI(range) > MDI(range) AND PDI(range) > 30,colorBrightGreen,colorGrey40));
Plot(2, "", trend, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
Plot(6, "", Col_adx, styleOwnScale| styleArea|styleNoLabel,-0.5,100);
_SECTION_END();
No comments:
Post a Comment
Thanks