GSPT1:=EMA(CLOSE,12)-EMA(CLOSE,26);
GSPT2:=EMA(GSPT1,9);
GSPT3:=(GSPT1-GSPT2)*2;
GSPT4:=CLOSE>REF(CLOSE,1)*1.097 AND CLOSE=HIGH;
GSPT5:=CLOSE>MA(CLOSE,5) AND CLOSE>MA(CLOSE,10);
GSPT6:=CLOSE>MA(CLOSE,20) AND CLOSE>MA(CLOSE,30);
GSPT7:=CLOSE>MA(CLOSE,60) AND CLOSE>MA(CLOSE,120);
GSPT8:=BARSLAST(GSPT4 AND GSPT5 AND GSPT6 AND GSPT7 AND C>MA(C,250));
GSPT9:=EVERY(CLOSE<OPEN,GSPT8) AND GSPT8<10 AND GSPT3>REF(GSPT3,1);
GSPT48:=GSPT9 AND CLOSE>MA(CLOSE,5) AND CLOSE>MA(CLOSE,10);
GSPT49:=GSPT48 AND CLOSE>MA(CLOSE,20) AND CLOSE>MA(CLOSE,30);
XG:GSPT49 AND C>MA(C,60) AND C>MA(C,120) AND C>MA(C,250);