顺势多空(DMI改名释义,源码,上证图释义,适合新股民)介绍
顺势多空(DMI改名释义,源码,上证图释义,适合新股民)
{副图名称:顺势多空,(多空顺势)}
{参数设置:N(2,90,14);MM(2,60,6)}
{改名释义:见凌见.JIPGEMLING.版权没有.改版不究}
MTR:=EXPMEMA(MAX(MAX(ABS(HIGH-LOW),ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
多头线:PDI,COLORRED,LINETHICK2;
空头线:MDI,COLORCYAN,LINETHICK1;
顺势线_多或空:EXPMEMA(ABS(PDI-MDI)/(MDI+PDI)*100,MM),DOTLINE;
顺势线M:EXPMEMA(顺势线_多或空,MM),DOTLINE;
{DMI 原版:
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI: DMP*100/MTR;
MDI: DMM*100/MTR;
ADX: EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,MM);
ADXR:EXPMEMA(ADX,MM); }
gd15879