VAR1:=CLOSE-REF(CLOSE,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
VAR3:=MA(CLOSE,5);
VAR4:=MA(CLOSE,4);
VAR5:=MA(CLOSE,3);
VAR6:=MA(VOL,5);
VAR7:=VAR3>VAR4 AND SLOPE(VAR3,5)<0 AND SLOPE(VAR4,4)<0 AND SLOPE(VAR5,3) AND REF(VAR4>VAR5,1) AND CROSS(VAR5,VAR4) AND VOL>VAR6;
XG:IF(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2)),1,0) AND VAR7;