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);
X_5:=CROSS(X_1,X_2);
X_6:=BARSLAST(X_4);
X_7:=BARSLAST(X_5);
X_8:=REF(X_7,X_6+1)+X_6+1;
X_9:=REF(X_6,X_7+1)+X_7+1;
X_10:=BARSLAST(X_1=HHV(X_1,X_8));
X_11:=BARSLAST(X_1=LLV(X_1,X_9));
X_12:=BARSLAST(BARSLASTCOUNT(MACD.DIF<0)>1);
X_13:=BARSLAST(BARSLASTCOUNT(MACD.DIF>0)>1);
X_14:=BARSLAST(X_1=HHV(X_1,X_8))>X_7 AND BARSLAST(HIGH=HHV(HIGH,X_8))<=X_7 AND REF(LLV(X_1,X_6),1)>0 AND MACD.DIF>0;
X_15:=BARSLAST(X_1=LLV(X_1,X_9))>X_6 AND BARSLAST(LOW=LLV(LOW,X_9))<=X_6 AND REF(HHV(X_1,X_7),1)<0 AND MACD.DIF<0;
X_15 AND X_2<0 AND X_1>REF(X_1,1) AND REF(X_1,1)<REF(X_2,1) AND REF(X_1,2)<REF(X_2,2);