X_1:=(CLOSE-EMA(CLOSE,5))/EMA(CLOSE,5)*100;
X_2:=(CLOSE-EMA(CLOSE,10))/EMA(CLOSE,10)*100;
X_3:=(CLOSE-EMA(CLOSE,20))/EMA(CLOSE,20)*100;
X_4:=(CLOSE-EMA(CLOSE,60))/EMA(CLOSE,60)*100;
X_5:=(CLOSE-EMA(CLOSE,120))/EMA(CLOSE,120)*100;
X_6:=X_1>2 AND X_2>4 AND X_3>6 AND X_4>8;
XG:BArslASTCOUNT(X_6=1) AND crOSS(CLOSE,EMA(CLOSE,50)*1.2) AND HIGH/CLOSE<1.0368;