VAR2:=EMA(VAR1,9);
VAR3:=2*(VAR1-VAR2);
VAR4:=BARSLAST(CROSS(VAR2,VAR1));
VAR5:=BARSLAST(CROSS(VAR1,VAR2));
VAR6:=REF(VAR2,VAR4);
VAR7:=CROSS(VAR1,VAR6);
VAR8:=BARSLAST(VAR7);
VAR9:=REF(CLOSE,2)/REF(CLOSE,1)>1.05;
VAR10:=CLOSE/REF(CLOSE,1)>1.095;
VAR11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
VAR12:=SMA(VAR11,3,1);
VAR13:=SMA(VAR12,3,1);
VAR14:=3*VAR12-2*VAR13;
XG:VAR14< 80 AND VAR9 AND VAR10 AND VAR3>0;