N:=14;
M:=6;
MTR:=EXPMEMA(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),14);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),14);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),14);
pdi:DMP*100/MTR,LINETHICK0;
mdi:DMM*100/MTR,LINETHICK0;
STICKLINE(PDI>=MDI,50,50+(PDI-MDI),0.5,0),COLORRED;
STICKLINE(PDI<MDI,50,50-(MDI-PDI),0.5,1),COLOR00FF00;
ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,6),COLORRED,LINETHICK0;
ADXR:EXPMEMA(ADX,6),COLORFF00FF,LINETHICK0;
DRAWBAND(ADX,RGB(220,0,0),ADXR,RGB(20,240,240));
STICKLINE(C>0,100,105,3,1),COLORFFFF00;
{公式指标 www.gszb.top}
STICKLINE(ADX>=ADXR,100,105,3,0),COLOR0000FF;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),LINETHICK0;
D:SMA(K,3,1),LINETHICK0;
J:3*K-2*D,COLOR00FF00,LINETHICK1;
DRAWBAND(K,RGB(220,0,220),D,RGB(180,140,140));
STICKLINE(C>0,0,-5,3,1),COLORFFFF00;
STICKLINE(K>=D,0,-5,3,0),COLORFF00FF;
DRAWTEXT(CURRBARSCOUNT=8,100,'ADX金叉ADXR'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=7,-7,'kdj金叉'),COLORFFFF00;
DRAWTEXT(CURRBARSCOUNT=6,55,'PDI与MDI'),COLORFFFF00;
通达信组合KDJ+DMI指标公式
本文来自网络,不代表公式指标立场,转载请注明出处:https://www.gszb.top/80874.html