SY:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,2)>REF(CLOSE,3)*1.05;
T1:=ABS(C-O)/O>0.001 AND ABS(C-O)/O<0.005 AND H>MAX(C,O) AND L<MIN(C,O);
XG1:=BARSLAST(T1)=1 AND REF(VOL,1)<REF(VOL,2)*0.8;
XG2:=REF(CLOSE,1)>REF(CLOSE,2)*0.98 AND REF(CLOSE,1)<REF(OPEN,1);
XG:(SY AND XG1) OR (SY AND XG2);