通达信精品中的精品:撑压线模拟版
X_36:=IF(X_25=1 AND REF(X_27,1)<REF(X_26,1) AND (X_27>=4 OR HHV(X_7,X_27)=1),1,0);
X_37:=X_27<4 AND HHV(X_7,X_27)!=1 OR REF(X_18,X_27)=0;
X_38:=X_25=1 AND REF(X_27,1)<REF(X_26,1);
X_39:=X_11>REF(X_10,X_27+1) AND X_11>REF(X_10,X_27) AND X_11>REF(X_11,REF(BARSLAST(X_25=1),X_26+1)+X_26+1);
X_40:=X_37 AND X_38 AND X_39;
X_41:=IF(X_35=1 OR X_36=1 OR X_40,1,0);
X_42:=BARSLAST(X_41=1);
X_43:=BARSLAST(X_34=(-1));
X_44:=IF(X_34=(-1) AND REF(X_42,1)>REF(X_43,1) AND LLV(LOW,X_42+1)<REF(LLV(LOW,X_42+1),1),(-1),0);
X_45:=IF(X_34=(-1) AND REF(X_42,1)<REF(X_43,1) AND (X_42>=4 OR LLV(X_7,X_42)=(-1) OR LOW<REF(LLV(LOW,X_43+1),1)),(-1),0);
X_46:=X_42<4 AND HHV(X_7,X_42)!=(-1);
X_47:=X_34=(-1) AND REF(X_42,1)<REF(X_43,1);
X_48:=X_10>REF(X_11,X_42+1) AND X_10>REF(X_11,X_42) AND X_10>REF(X_10,REF(BARSLAST(X_34=(-1)),X_43+1)+X_43+1);
X_49:=X_46 AND X_47 AND X_48;
X_50:=IF(X_44=(-1) OR X_45=(-1) OR X_49,(-1),0);
X_51:=IF(X_41=1 AND REF(X_43,1)>REF(X_42,1) AND HHV(HIGH,X_43+1)>REF(HHV(HIGH,X_43+1),1),1,0);
X_52:=IF(X_41=1 AND REF(X_43,1)<REF(X_42,1) AND (X_43>=4 OR HHV(X_7,X_43)=1),1,0);
X_53:=X_43<4 AND HHV(X_7,X_43)!=1 OR REF(X_34,X_43)=0;
X_54:=X_41=1 AND REF(X_43,1)<REF(X_42,1);
X_55:=X_11>REF(X_10,X_43+1) AND X_11>REF(X_10,X_43) AND X_11>REF(X_11,REF(BARSLAST(X_41=1),X_42+1)+X_42+1);
X_56:=X_53 AND X_54 AND X_55;
X_57:=IF(X_51=1 OR X_52=1 OR X_56,1,0);
X_58:=BARSLAST(X_57=1);
X_59:=BARSLAST(X_50=(-1));
X_60:=REF(BARSLAST(X_57=1),X_58+1)+X_58+1;
X_61:=REF(BARSLAST(X_50=(-1)),X_59+1)+X_59+1;
X_62:=BACKSET(X_50=(-1) AND REF(X_58,1)<REF(X_59,1),X_58+1);
X_63:=BACKSET(X_50=(-1) AND REF(X_58,1)>REF(X_59,1),X_61+1);
X_64:=BACKSET(X_57=1 AND REF(X_58,1)>REF(X_59,1),X_59+1);
X_65:=BACKSET(X_57=1 AND REF(X_58,1)<REF(X_59,1),X_60+1);
X_66:=BACKSET(NOT(X_50=(-1) OR X_57=1) AND X_58>X_59 AND X_59>=5 AND CLOSE>REF(LOW,X_59),X_59+1);
X_67:=BACKSET(NOT(X_50=(-1) OR X_57=1) AND X_58<X_59 AND X_58>=5 AND CLOSE<REF(LOW,X_58),X_58+1);
X_68:=IF(X_50=(-1) AND (X_62+X_64=2 OR X_63+X_64=2 OR X_62+X_65=2 OR X_66=1),(-1),0);
X_69:=IF(X_57=1 AND (X_62+X_64=2 OR X_63+X_64=2 OR X_62+X_65=2 OR X_67=1),1,0);
X_70:=IF(X_50=(-1) AND (X_62+X_64=2 OR X_63+X_64=2 OR X_62+X_65=2),(-1),0);
X_71:=IF(X_57=1 AND (X_62+X_64=2 OR X_63+X_64=2 OR X_62+X_65=2),1,0);
X_72:=REF(BARSLAST(X_70=(-1)),1)+1;
X_73:=REF(BARSLAST(X_70=(-1)),X_72+1)+X_72+1;
X_74:=REF(BARSLAST(X_71=1),1)+1;
X_75:=REF(BARSLAST(X_71=1),X_74+1)+X_74+1;
X_76:=ATAN((REF(LOW,X_72)-REF(LOW,X_73))/REF(LOW,X_73)/(X_73-X_72)*100)/3.141593*180;
X_77:=ATAN((REF(HIGH,X_74)-REF(HIGH,X_75))/REF(HIGH,X_75)/(X_75-X_74)*100)/3.141593*180;
X_78:=X_70=(-1) AND BACKSET(ISLASTBAR,X_73+1);
X_79:=X_70=(-1) AND BACKSET(ISLASTBAR,X_72+1);
X_80:=X_71=1 AND BACKSET(ISLASTBAR,X_75+1);
X_81:=X_71=1 AND BACKSET(ISLASTBAR,X_74+1);
X_82:=DRAWLINE(X_78,LOW,X_79,LOW,1);
X_83:=DRAWLINE(X_80,HIGH,X_81,HIGH,1);
X_84:=X_76>=0 AND X_72<X_74 AND REF(HHV(CLOSE,X_74),1)<=REF(HIGH,X_74) AND CLOSE>REF(HIGH,X_74);
X_85:=X_76>=0 AND X_77<0 AND X_82<X_83 AND CROSS(CLOSE,X_83);
X_86:=X_76<0 AND X_76>X_77 AND X_77<0 AND X_77>(-45) AND CROSS(CLOSE,X_83);
OK:BARSSINCEN(X_84,X_74)+1=1 OR BARSSINCEN(X_85,X_74)+1=1 OR BARSSINCEN(X_86,X_74)+1=1;
- 上一篇公式:通达信圆月弯弓刀源码
- 下一篇公式:通达信撑压线指标源码