MTR:=EMA(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),3);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EMA(IF(HD>0 AND HD>LD,HD,0),3);
DMM:=EMA(IF(LD>0 AND LD>HD,LD,0),3);
pdi:=EMA(DMP*100/MTR,13);
mdi:=EMA(DMM*100/MTR,13);
快线:=PDI-MDI,COLORSTICK;
//{ _同花顺股票指标公式}
慢线:=EMA(FORCAST(快线,8),3),colorwhite,LINETHICK1;
短多:(快线-慢线)*4, LINESTICK,colorred;
短空:-(快线-慢线)*4, LINESTICK,colorcyan;
短多线:(快线-慢线)*4,colorred;
短空线:-(快线-慢线)*4,colorcyan;
趋势:EMA(快线/(MDI+PDI)*100,2),COLORLIGRAY;
平均趋势:EMA(趋势,3),colorgray;
零轴:0,DOTLINE,colorwhite;