TR0:=SMA(MAX(MAX(实价-均价,ABS(实价-REF((实价+均价)/2,1))),ABS(均价-REF((实价+均价)/2,1))),N,1);
HD:=实价-REF(实价,1);
LD:=REF(均价,1)-均价;
{www.9m8.cn 九毛八新且全的股票公式指标网}
DMP:=SMA(IF(HD 0 AND HD LD,HD,0),N,1);
DMM:=SMA(IF(LD 0 AND LD HD,LD,0),N,1);
PDI:DMP*100/TR0,COLORRED;
MDI:DMM*100/TR0,COLORGREEN;
ADX:SMA(ABS(MDI-PDI)/(MDI+PDI)*100,N/2,1),COLORWHITE;
10,LINEDOT,COLORGRAY;
30,COLORYELLOW;
50,LINEDOT,COLORMAGENTA;