{副图名称:多空指标}
{参数设置:N(2,90,14);MM(2,60,6)}
MTR:=EXPMEMA(MAX(MAX(ABS(HIGH-LOW),ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);
HD :=HIGH-REF(HIGH,1);
LD :=REF(LOW,1)-LOW;
DMP:=EXPMEMA(IF(HD>0&&HD>LD,HD,0),N);
DMM:=EXPMEMA(IF(LD>0&&LD>HD,LD,0),N);
PDI:=DMP*100/MTR;
MDI:=DMM*100/MTR;
多头线:PDI,COLORRED,LINETHICK4;
空头线:MDI,COLORCYAN,LINETHICK3;
DRAWBAND(多头线,RGB(155,50,50),空头线,RGB(256,96,96));
注意线_多或空:EXPMEMA(ABS(PDI-MDI)/(MDI+PDI)*100,MM),COLORFF00FF,LINETHICK1;
顺势线M:EXPMEMA(注意线_多或空,MM),COLOR00FF00,LINETHICK1;