X_1:=(EMA(CLOSE,4)+MA(CLOSE,8)+MA(CLOSE,16))/3;
X_2:=(EMA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/3;
X_3:=(EMA(CLOSE,9)+MA(CLOSE,18)+MA(CLOSE,36))/3;
X_4:=(EMA(CLOSE,13)+MA(CLOSE,26)+MA(CLOSE,52))/3;
X_5:=(EMA(CLOSE,18)+MA(CLOSE,36)+MA(CLOSE,72))/3;
X_6:=(EMA(CLOSE,24)+MA(CLOSE,48)+MA(CLOSE,96))/3;
OPEN<X_1 AND OPEN<X_2 AND OPEN<X_3 AND OPEN<X_4 AND OPEN<X_5 AND OPEN<X_6 AND CLOSE>X_1 AND CLOSE>X_2 AND CLOSE>X_3 AND CLOSE>X_4 AND CLOSE>X_5 AND CLOSE>X_6;
X_7:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);
X_8:=DMA(CLOSE,X_7);
X_9:=(1-14/100)*X_8;
XG:BETWEEN(CLOSE,X_9*0.98,X_9*1.01);