X_44:=10;
X_45:=10;
X_46:=3;
X_47:=10;
X_48:=2.5;
X_49:=maX(MAX(HIGH-LOW,Abs(REF(CLOSE,1)-HIGH)),ABS(REF(CLOSE,1)-LOW));
X_50:=(HIGH+LOW)/2+MA(X_49,X_47)*X_48;
X_51:=(HIGH+LOW)/2-MA(X_49,X_47)*X_48;
X_52:=REF(X_50,BArslAst(X_50<=REF(X_50,1)));
X_53:=LLV(X_50,X_45*1.5);
X_54:=IF(X_53!=REF(X_53,1) AND X_52<REF(X_52,1),X_52,IF(X_52=X_53,X_52,X_53));
X_55:=BARSLAST(crOSS(0.5,X_50=X_54))+1;
X_56:=CROSS(COUNT(CROSS(CLOSE,X_54) OR CROSS(CLOSE,REF(X_54,2)) AND X_50>X_54,X_55),0.5);
X_57:=BARSLAST(X_56);
X_58:=BARSLAST(CROSS(HHV(X_51,X_57+1),CLOSE));
XG:CROSS(X_58,X_57);