X9_1:=MAX(MAX(HIGH-LOW,Abs(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
X9_2:=(HIGH+LOW)/2+MA(X9_1,2);
X9_3:=(HIGH+LOW)/2-MA(X9_1,2);
X9_4:=REF(X9_2,BArslAST(X9_2<=REF(X9_2,1)));
X9_5:=LLV(X9_2,2*1.5);
X9_6:=IF(X9_5!=REF(X9_5,1) AND X9_4<REF(X9_4,1),X9_4,IF(X9_4=X9_5,X9_4,X9_5));
X9_7:=BARSLAST(crOSS(0.5,X9_2=X9_6))+1;
X9_8:=CROSS(COUNT(CROSS(CLOSE,X9_6) OR CROSS(CLOSE,REF(X9_6,2)) AND X9_2>X9_6,X9_7),0.5);
X9_9:=BARSLAST(X9_8);
X9_10:=BARSLAST(CROSS(HHV(X9_3,X9_9+1),CLOSE));
X9_11:=MA(CLOSE,18);
X9_12:=CLOSE>=X9_11*1.004;
X9_13:=X9_11>=REF(X9_11,1);
X9_14:=X9_12 AND X9_13;
X9_15:=IF(CLOSE<OPEN,(CLOSE-LOW)/(HIGH-LOW),0);
X:CROSS(X9_9,X9_10) AND CLOSE/REF(LLV(LOW,3),1)<1 AND CLOSE<OPEN AND CLOSE!=LOW AND X9_14 AND X9_15>0.03 AND X9_15<0.3 AND (C-REF(C,1))/REF(C,1)*100<(0-4) AND CLOSE<expma(CLOSE,14) AND CLOSE>EXPMA(CLOSE,21) AND REF(DOWNNDAY(C,1),1);