TR:=EXPMEMA(MAX(MAX(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/TR,COLORFFFFFF;
MDI:= DMM*100/TR,COLOR00FFFF;
ADX:= EXPMEMA(ABS(MDI-PDI)/(MDI+PDI)*100,M),COLOR0000FF,LINETHICK2;
ADXR:=EXPMEMA(ADX,M),COLOR00FF00,LINETHICK2;
{一,MDI必须在下方,PDI在下方无效,二、PDI趋势向上。三、必须在PDI及MDI中间金叉 }
DYNAINFO(9)>0 AND CROSS(ADX,ADXR) AND PDI>MDI AND PDI>REF(PDI,1)
AND BETWEEN(ADXR,MDI,PDI) AND ADX>REF(ADX,1) AND ADXR>REF(ADXR,1); |