VAR0:=VOL/CLOSE/2;
VAR1:=SUM(IF(VAR0>100 AND CLOSE>REF(CLOSE,1),VAR0,0),0);
VAR2:=SUM(IF(VAR0>100 AND CLOSE<REF(CLOSE,1),VAR0,0),0);
VAR3:=SUM(IF(VAR0<100 AND CLOSE>REF(CLOSE,1),VAR0,0),0);
VAR4:=SUM(IF(VAR0<100 AND CLOSE<REF(CLOSE,1),VAR0,0),0);
VAR5:=VAR1+VAR2+VAR3+VAR4;
VAR1>VAR2 AND VAR3>VAR4 AND VAR1>REF(VAR1,1) AND
REF(VAR1,1)>REF(VAR1,2) AND
(VAR1+VAR3)/VAR5*100>60; |