dmi上的改进,源码:
TR:=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/TR;
MDI:DMM*100/TR;
ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M);
ADXR:EXPMEMA(ADX,M);
A:=CROSS(ADX,ADXR);
B:=CROSS(ADXR,ADX);
DRAWTEXT(A=1,ADX,'金叉'),COLORRED;
DRAWTEXT(B=1,ADXR,'死叉'),COLORWHITE;
D:=CROSS(PDI,MDI);
E:=CROSS(MDI,PDI);
DRAWTEXT(D=1,PDI,'D');
DRAWTEXT(E=1,MDI,'E');
上一篇:通达信成交量看主力副图源码真正的王者指标 下一篇:通达信捕捉黑马的秘器主动买卖盘副图源码