MA5:=MA(CLOSE,5);
MA13:=MA(CLOSE,13);
MA21:=MA(CLOSE,21);
MA60:=MA(CLOSE,60);
MA144:=MA(CLOSE,144);
VAR1:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,35)-LLV(LOW,34)),3);
VAR2:=OPEN<MA5 OR OPEN<MA13 OR OPEN<MA21;
VAR3:=CLOSE>MAX(MA5,MAX(MA13,MAX(MA21,MA60)));
VAR4:=vol/MA(VOL,30)>1.2;
VAR5:=CLOSE/REF(CLOSE,1)>1.049;
VAR8:=VAR2 AND VAR3 AND VAR4 AND VAR5;
XG:VAR8 AND (REF(BARSLAST(VAR8),1)>60 OR BARSSINCE(VAR8)=0);