X_1:=EMA(CLOSE,12)-EMA(CLOSE,26);
X_2:=EMA(X_1,9);
X_3:=(X_1-X_2)*2;
X_4:=CROSS(X_2,X_1) AND X_2>0;
X_5:=REF(HIGH,BARSLAST(X_4));
X_6:=CLOSE>X_5 AND REF(CLOSE,1)<X_5;
X_7:=X_3>0 AND REF(X_3,1)>0 AND REF(X_3,2)>0 AND X_3-REF(X_3,1)>0.01 AND REF(X_3,2)-REF(X_3,1)>0.01 AND REF(X_3,3)-REF(X_3,2)>0.01;
买进:X_6 OR X_7;