网友求助:
解答如下:
TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),7);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
DMP:= SUM(IF(HD>0 AND HD>LD,HD,0),7);
DMM:= SUM(IF(LD>0 AND LD>HD,LD,0),7);
+DI:=DMP*100/TR;
-DI:=DMM*100/TR;
ADX:=MA(ABS(-DI-+DI)/(-DI++DI)*100,6);
ADXR:=(ADX+REF(ADX,6))/2;
SELECT=CROSS(+DI,ADXR) AND CROSS(+DI,ADX) AND CROSS(+DI,-DI) AND (C-REF(C,1))/REF(C,1)*100>5;