X_1:=EMA(CLOSE,5);
X_2:=EMA(CLOSE,13);
X_3:=LLV(LOW,BARSLAST(CROSS(X_2,X_1))+1);
X_4:=HHV(HIGH,BARSLAST(CROSS(X_1,X_2))+1);
X_5:=HHV(HIGH,BARSLAST(CROSS(X_1,X_2))+1);
X_6:=LLV(LOW,BARSLAST(CROSS(X_2,X_1))+1);
X_7:=EVERY(RANGE(MA(X_5,5)/MA(X_3,5),0.93,1.2),5);
X_8:=EVERY(RANGE(MA(X_5,13)/MA(X_3,13),0.93,1.2),13);
X_9:=EVERY(RANGE(MA(X_6,5)/MA(X_5,5),0.93,1.2),5);
X_10:=EVERY(RANGE(MA(X_6,13)/MA(X_5,13),0.93,1.2),13);
X_11:=CLOSE-REF(CLOSE,1);
X_12:=100*EMA(EMA(X_11,6),6)/EMA(EMA(ABS(X_11),6),6);
X_13:=LLV(X_12,2)=LLV(X_12,7) AND COUNT(X_12<0,2) AND CROSS(X_12,MA(X_12,2)) AND X_7 AND X_8 AND X_9 AND X_10;
XG:COUNT(X_13,2)=1;