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(HJ_7,HJ_9)=1),1,0);
HJ_21:=HJ_9<4 AND HHV(HJ_7,HJ_9)!=1 OR REF(HJ_18,HJ_9)=0;
HJ_22:=HJ_6=1 AND REF(HJ_9,1)<REF(HJ_8,1);
HJ_23:=HJ_11>REF(HJ_10,HJ_9+1) AND HJ_11>REF(HJ_10,HJ_9) AND HJ_11>REF(HJ_11,REF(BARSLAST(HJ_6=1),HJ_8+1)+HJ_8+1);
HJ_24:=HJ_21 AND HJ_22 AND HJ_23;
HJ_25:=IF(HJ_19=1 OR HJ_20=1 OR HJ_24,1,0);
HJ_26:=BARSLAST(HJ_25=1);
HJ_27:=BARSLAST(HJ_18=(-1));
HJ_28:=IF(HJ_18=(-1) AND REF(HJ_26,1)>REF(HJ_27,1) AND LLV(LOW,HJ_26+1)<REF(LLV(LOW,HJ_26+1),1),(-1),0);
HJ_29:=IF(HJ_18=(-1) AND REF(HJ_26,1)<REF(HJ_27,1) AND (HJ_26>=4 OR LLV(HJ_7,HJ_26)=(-1) OR LOW<REF(LLV(LOW,HJ_27+1),1)),(-1),0);
HJ_30:=HJ_26<4 AND HHV(HJ_7,HJ_26)!=(-1);
HJ_31:=HJ_18=(-1) AND REF(HJ_26,1)<REF(HJ_27,1);
HJ_32:=HJ_10>REF(HJ_11,HJ_26+1) AND HJ_10>REF(HJ_11,HJ_26) AND HJ_10>REF(HJ_10,REF(BARSLAST(HJ_18=(-1)),HJ_27+1)+HJ_27+1);
HJ_33:=HJ_30 AND HJ_31 AND HJ_32;
HJ_34:=IF(HJ_28=(-1) OR HJ_29=(-1) OR HJ_33,(-1),0);
HJ_35:=IF(HJ_25=1 AND REF(HJ_27,1)>REF(HJ_26,1) AND HHV(HIGH,HJ_27+1)>REF(HHV(HIGH,HJ_27+1),1),1,0);
HJ_36:=IF(HJ_25=1 AND REF(HJ_27,1)<REF(HJ_26,1) AND (HJ_27>=4 OR HHV(HJ_7,HJ_27)=1),1,0);
HJ_37:=HJ_27<4 AND HHV(HJ_7,HJ_27)!=1 OR REF(HJ_18,HJ_27)=0;
HJ_38:=HJ_25=1 AND REF(HJ_27,1)<REF(HJ_26,1);
HJ_39:=HJ_11>REF(HJ_10,HJ_27+1) AND HJ_11>REF(HJ_10,HJ_27) AND HJ_11>REF(HJ_11,REF(BARSLAST(HJ_25=1),HJ_26+1)+HJ_26+1);
HJ_40:=HJ_37 AND HJ_38 AND HJ_39;
HJ_41:=IF(HJ_35=1 OR HJ_36=1 OR HJ_40,1,0);
HJ_42:=BARSLAST(HJ_41=1);
HJ_43:=BARSLAST(HJ_34=(-1));
HJ_44:=IF(HJ_34=(-1) AND REF(HJ_42,1)>REF(HJ_43,1) AND LLV(LOW,HJ_42+1)<REF(LLV(LOW,HJ_42+1),1),(-1),0);
HJ_45:=IF(HJ_34=(-1) AND REF(HJ_42,1)<REF(HJ_43,1) AND (HJ_42>=4 OR LLV(HJ_7,HJ_42)=(-1) OR LOW<REF(LLV(LOW,HJ_43+1),1)),(-1),0);
HJ_46:=HJ_42<4 AND HHV(HJ_7,HJ_42)!=(-1);
HJ_47:=HJ_34=(-1) AND REF(HJ_42,1)<REF(HJ_43,1);
HJ_48:=HJ_10>REF(HJ_11,HJ_42+1) AND HJ_10>REF(HJ_11,HJ_42) AND HJ_10>REF(HJ_10,REF(BARSLAST(HJ_34=(-1)),HJ_43+1)+HJ_43+1);
HJ_49:=HJ_46 AND HJ_47 AND HJ_48;
HJ_50:=IF(HJ_44=(-1) OR HJ_45=(-1) OR HJ_49,(-1),0);
HJ_51:=IF(HJ_41=1 AND REF(HJ_43,1)>REF(HJ_42,1) AND HHV(HIGH,HJ_43+1)>REF(HHV(HIGH,HJ_43+1),1),1,0);
HJ_52:=IF(HJ_41=1 AND REF(HJ_43,1)<REF(HJ_42,1) AND (HJ_43>=4 OR HHV(HJ_7,HJ_43)=1),1,0);
HJ_53:=HJ_43<4 AND HHV(HJ_7,HJ_43)!=1 OR REF(HJ_34,HJ_43)=0;
HJ_54:=HJ_41=1 AND REF(HJ_43,1)<REF(HJ_42,1);
HJ_55:=HJ_11>REF(HJ_10,HJ_43+1) AND HJ_11>REF(HJ_10,HJ_43) AND HJ_11>REF(HJ_11,REF(BARSLAST(HJ_41=1),HJ_42+1)+HJ_42+1);
HJ_56:=HJ_53 AND HJ_54 AND HJ_55;
HJ_57:=IF(HJ_51=1 OR HJ_52=1 OR HJ_56,1,0);
HJ_58:=BARSLAST(HJ_57=1);
HJ_59:=BARSLAST(HJ_50=(-1));
HJ_60:=REF(BARSLAST(HJ_57=1),HJ_58+1)+HJ_58+1;
HJ_61:=REF(BARSLAST(HJ_50=(-1)),HJ_59+1)+HJ_59+1;
HJ_62:=BACKSET(HJ_50=(-1) AND REF(HJ_58,1)<REF(HJ_59,1),HJ_58+1);
HJ_63:=BACKSET(HJ_50=(-1) AND REF(HJ_58,1)>REF(HJ_59,1),HJ_61+1);
HJ_64:=BACKSET(HJ_57=1 AND REF(HJ_58,1)>REF(HJ_59,1),HJ_59+1);
HJ_65:=BACKSET(HJ_57=1 AND REF(HJ_58,1)<REF(HJ_59,1),HJ_60+1);
HJ_66:=BACKSET(NOT(HJ_50=(-1) OR HJ_57=1) AND HJ_58>HJ_59 AND HJ_59>=5 AND CLOSE>REF(LOW,HJ_59),HJ_59+1);
HJ_67:=BACKSET(NOT(HJ_50=(-1) OR HJ_57=1) AND HJ_58<HJ_59 AND HJ_58>=5 AND CLOSE<REF(LOW,HJ_58),HJ_58+1);
HJ_68:=IF(HJ_50=(-1) AND (HJ_62+HJ_64=2 OR HJ_63+HJ_64=2 OR HJ_62+HJ_65=2 OR HJ_66=1),(-1),0);
HJ_69:=IF(HJ_57=1 AND (HJ_62+HJ_64=2 OR HJ_63+HJ_64=2 OR HJ_62+HJ_65=2 OR HJ_67=1),1,0);
HJ_70:=IF(HJ_50=(-1) AND (HJ_62+HJ_64=2 OR HJ_63+HJ_64=2 OR HJ_62+HJ_65=2),(-1),0);
HJ_71:=IF(HJ_57=1 AND (HJ_62+HJ_64=2 OR HJ_63+HJ_64=2 OR HJ_62+HJ_65=2),1,0);
HJ_72:=REF(BARSLAST(HJ_70=(-1)),1)+1;
HJ_73:=REF(BARSLAST(HJ_70=(-1)),HJ_72+1)+HJ_72+1;
HJ_74:=REF(BARSLAST(HJ_71=1),1)+1;
HJ_75:=REF(BARSLAST(HJ_71=1),HJ_74+1)+HJ_74+1;
HJ_76:=ATAN((REF(LOW,HJ_72)-REF(LOW,HJ_73))/REF(LOW,HJ_73)/(HJ_73-HJ_72)*100)/3.141593*180;
HJ_77:=ATAN((REF(HIGH,HJ_74)-REF(HIGH,HJ_75))/REF(HIGH,HJ_75)/(HJ_75-HJ_74)*100)/3.141593*180;
HJ_78:=HJ_70=(-1) AND BACKSET(ISLASTBAR,HJ_73+1);
HJ_79:=HJ_70=(-1) AND BACKSET(ISLASTBAR,HJ_72+1);
HJ_80:=HJ_71=1 AND BACKSET(ISLASTBAR,HJ_75+1);
HJ_81:=HJ_71=1 AND BACKSET(ISLASTBAR,HJ_74+1);
HJ_82:=DRAWLINE(HJ_78,LOW,HJ_79,LOW,1);
HJ_83:=DRAWLINE(HJ_80,HIGH,HJ_81,HIGH,1);
HJ_84:=HJ_76>=0 AND HJ_72<HJ_74 AND REF(HHV(CLOSE,HJ_74),1)<=REF(HIGH,HJ_74) AND CLOSE>REF(HIGH,HJ_74);
HJ_85:=HJ_76>=0 AND HJ_77<0 AND HJ_82<HJ_83 AND CROSS(CLOSE,HJ_83);
HJ_86:=HJ_76<0 AND HJ_76>HJ_77 AND HJ_77<0 AND HJ_77>(-45) AND CROSS(CLOSE,HJ_83);
OK:BARSSINCEN(HJ_84,HJ_74)+1=1 OR BARSSINCEN(HJ_85,HJ_74)+1=1 OR BARSSINCEN(HJ_86,HJ_74)+1=1;
{-----------------------------------}
|