X_1:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_2:=EMA(X_1,9);
X_3:=(X_1-X_2)*2;
X_4:=BARSLAST(CLOSE>REF(CLOSE,1)*1.097 AND CLOSE=HIGH AND CLOSE>MA(CLOSE,5) AND CLOSE>MA(CLOSE,10) AND CLOSE>MA(CLOSE,20) AND CLOSE>MA(CLOSE,30) AND CLOSE>MA(CLOSE,60) AND CLOSE>MA(CLOSE,120) AND CLOSE>MA(CLOSE,250));
EVERY(CLOSE<OPEN,X_4) AND X_4<10 AND X_3>REF(X_3,1) AND CLOSE>MA(CLOSE,5) AND CLOSE>MA(CLOSE,10) AND CLOSE>MA(CLOSE,20) AND CLOSE>MA(CLOSE,30) AND CLOSE>MA(CLOSE,60) AND CLOSE>MA(CLOSE,120) AND CLOSE>MA(CLOSE,250);