N:=14;M:=6;{股票公式-股票指标www.gs6699.com}
通达信:=EXPMEMA(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
炒股指标公式:=HIGH-REF(HIGH,1);
ccssd1:=REF(LOW,1)-LOW;
ccssd2:=EXPMEMA(IF(炒股指标公式>0&&炒股指标公式>ccssd1,炒股指标公式,0),N);
ccssd3:=EXPMEMA(IF(ccssd1>0&&ccssd1>炒股指标公式,ccssd1,0),N);
PDI:ccssd2*100/通达信,LINETHICK2;
MDI:ccssd3*100/通达信,LINETHICK2;
ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),LINETHICK2;
ADXR:EXPMEMA(ADX,M),LINETHICK2;
ccssd4:=PDI<5&&ADX>60,LINETHICK2,COLOR0000FF;
ccssd5:IF(ccssd4,50,0),LINETHICK5,COLOR0000FF;
ccssd6:=MA(CLOSE,1);
MA1:=MA(CLOSE,2);
ccssd7:=MA(CLOSE,3);
MA3:=MA(CLOSE,4);
ccssd8:=MA(CLOSE,5);
MA5:=MA(CLOSE,6);
dddcc0:SUM(ccssd6,5)/5,COLORRED,LINETHICK2;
dddcc1:SUM(MA1,5)/5;
dddcc2:SUM(ccssd7,5)/5;
dddcc3:SUM(MA3,5)/5;
dddcc4:SUM(ccssd8,5)/5;
dddcc5:SUM(MA5,5)/5,COLORCYAN,LINETHICK2;
dddcca1:=CROSS(C,dddcc5);
DRAWICON(dddcca1,dddcc0,11);