DIF:=EMA(CLOSE,9)-EMA(CLOSE,13);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
VA1:=C>MA(C,10);
XG1:=MACD>0;
VAR1:=(EMA(CLOSE,5) - EMA(CLOSE,20));
VAR2:=EMA(VAR1,20);
VAR3:=BARSLAST(crOSS(VAR1,VAR2));
VAR4:=REF(VAR3,VAR3+3);
VAR5:=VAR2<REF(VAR2,VAR4);
VAR6:=CROSS(VAR1,VAR2) AND VAR5;
XG:VAR6>0 AND XG1 AND VA1;