N:=14;M:=6;MTRA:=EXPME(MAX(MAX(HIGH-LOW,A(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);HDA :=HIGH-REF(HIGH,1);LDA :=REF(LOW,1)-LOW;DMPA:=EXPMEMA(IF(HDA>0&&HDA>LDA,HDA,0),N);DMMA:=EXPMEMA(IF(LDA>0&&LDA>HDA,LDA,0),N);:DMPA*100/MTRA,LINETHICK2;:DMMA*100/MTRA,LINETHICK2;ADX:EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),LINETHICK2;ADXR:EXPMEMA(ADX,M),LINETHICK2;{ _通达信公式}XG:=PDI<5>60,LINETHICK2,COLOR0000FF;MDI:IF(XG,50,0),LINETHICK5,COLOR0000FF;MA0:=MA(CLOSE,1);MA1:=MA(CLOSE,2);MA2:=MA(CLOSE,3);MA3:=MA(CLOSE