DMI超级转向指标-精品通达信指标公式源码分享
{DMI超级转向
N 14 2 100
M 6 1 100
ADXP 1 1 100}
TR:=SMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N,1);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
DMP:=SMA(IF(HD>0 AND HD>LD,HD,0),N,1);
DMM:=SMA(IF(LD>0 AND LD>HD,LD,0),N,1);
PDI1:=DMP*100/TR,COLORRED;
MDI1:=DMM*100/TR,COLORGREEN;
ADX:SMA(ABS(MDI1-PDI1)/(MDI1+PDI1)*100,M,1),COLORYELLOW,NODRAW;
ADXR:(ADX+REF(ADX,M))/2,COLORMAGENTA;
STICKLINE(ADX<=REF(ADXR,1),ADX,ADXR,2,0),COLORBLUE;
STICKLINE(ADX>REF(ADXR,1),ADX,ADXR,2,0),COLORRED;
PDI:PDI1,COLORYELLOW;
MDI:MDI1,COLORGREEN;
CD0:16;
CD1:30;
TD0:60;
TD1:80;
DRAWTEXT(CROSS( PDI,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,PDI), PDI,'●死'),COLORBLUE;
DRAWTEXT(CROSS( ADX,CD0), CD0,'●金'),COLORMAGENTA;
DRAWTEXT(CROSS( TD0,ADX), ADX,'●死'),COLORBLUE;
DRAWTEXT(CROSS( PDI,MDI), MDI,'★金'), COLORYELLOW;
DRAWTEXT(CROSS( MDI,PDI), PDI,'★死'), COLORGREEN;
DRAWTEXT(CROSS( ADX,ADXP), ADXP,'★金'), COLOR000999 ;
DRAWTEXT(CROSS( ADXP,ADX), ADX,'★死'), COLORCYAN;
版权声明
本文版权归掌上指标所有。
未经许可,不得转载,转载请注明出处!