N:=3;
M:=7;
A:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
A1:=HIGH-REF(HIGH,1);
A2:=REF(LOW,1)-LOW;
DMP:=SUM(IF(A1>0 AND A1>A2,A1,0),N);
DMM:=SUM(IF(A2>0 AND A2>A1,A2,0),N);
PDI:=DMP*100/A;
MDI:=DMM*100/A;
ADX:=MA((ABS(MDI-PDI))/(MDI+PDI)*100,M);
ADXR:=(ADX+REF(ADX,M))/2;
拉升:=IF(CURRBARSCOUNT=1 AND REF(C,1)<REF(C,2) AND C>REF(C,1) AND MA1>REF(MA1,1),CONST(REF(C,1)*1.01),DRAWNULL);
暴张前夜:IF(ADX>90 AND PDI=0,3,0) AND C<26;
暴张前夜
N:=3;
M:=7;
A:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),N);
A1:=HIGH-REF(HIGH,1);
A2:=REF(LOW,1)-LOW;
DMP:=SUM(IF(A1>0 AND A1>A2,A1,0),N);
DMM:=SUM(IF(A2>0 AND A2>A1,A2,0),N);
PDI:=DMP*100/A;
MDI:=DMM*100/A;
ADX:=MA((ABS(MDI-PDI))/(MDI+PDI)*100,M);
ADXR:=(ADX+REF(ADX,M))/2;
拉升:=IF(CURRBARSCOUNT=1 AND REF(C,1)<REF(C,2) AND C>REF(C,1) AND MA1>REF(MA1,1),CONST(REF(C,1)*1.01),DRAWNULL);
暴张前夜:IF(ADX>90 AND PDI=0,3,0) AND C<26;