X_1:=MAX(MAX(HIGH-LOW,Abs(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
X_2:=(HIGH+LOW)/2+MA(X_1,2);
X_3:=(HIGH+LOW)/2-MA(X_1,2);
X_4:=REF(X_2,BArslAST(X_2<=REF(X_2,1)));
X_5:=LLV(X_2,2*1.5);
X_6:=IF(X_5!=REF(X_5,1) AND X_4X_7:=BARSLAST(crOSS(0.5,X_2=X_6))+1;
X_8:=CROSS(COUNT(CROSS(CLOSE,X_6) OR CROSS(CLOSE,REF(X_6,2)) AND X_2>X_6,X_7),0.5);
X_9:=BARSLAST(X_8);
X_10:=BARSLAST(CROSS(HHV(X_3,X_9+1),CLOSE));
X_11:=MA(CLOSE,18);
X_12:=CLOSE>=X_11*1.004;
X_13:=X_11>=REF(X_11,1);
X_14:=X_12 AND X_13;
X_15:=IF(CLOSE