红牛2008 / 副图公式 / 通达信坡度几何副图源码

0 0

   

通达信坡度几何副图源码

2017-01-06  红牛2008

X_1:=BACKSET(LLV(LOW,5)<REF(LLV(LOW,4),1),4);

X_2:=BACKSET(X_1=0 AND REF(X_1,1)=1,2);

X_3:=IF(X_2=1 AND REF(X_2,1)=0,(-1),0);

X_4:=BACKSET(HHV(HIGH,5)>REF(HHV(HIGH,4),1),4);

X_5:=BACKSET(X_4=0 AND REF(X_4,1)=1,2);

X_6:=IF(X_5=1 AND REF(X_5,1)=0,1,0);

X_7:=IF(LOW>REF(HIGH,1),1,IF(HIGH<REF(LOW,1),(-1),0));

X_8:=BARSLAST(X_6=1);

X_9:=BARSLAST(X_3=(-1));

X_10:=LOWRANGE(LOW);

X_11:=TOPRANGE(HIGH);

X_12:=IF(X_3=(-1) AND REF(X_8,1)>REF(X_9,1) AND LLV(LOW,X_8+1)<REF(LLV(LOW,X_8+1),1),(-1),0);

X_13:=IF(X_3=(-1) AND REF(X_8,1)<REF(X_9,1) AND (X_8>=4 OR LLV(X_7,X_8)=(-1) OR LOW<REF(LLV(LOW,X_9+1),1)),(-1),0);

X_14:=X_8<4 AND COUNT(X_7=(-1),X_8)<1;

X_15:=X_3=(-1) AND REF(X_8,1)<REF(X_9,1);

X_16:=X_10>REF(X_11,X_8+1) AND X_10>REF(X_11,X_8) AND X_10>REF(X_10,REF(BARSLAST(X_3=(-1)),X_9+1)+X_9+1);

X_17:=X_14 AND X_15 AND X_16;

X_18:=IF(X_12=(-1) OR X_13=(-1) OR X_17,(-1),0);

X_19:=IF(X_6=1 AND REF(X_9,1)>REF(X_8,1) AND HHV(HIGH,X_9+1)>REF(HHV(HIGH,X_9+1),1),1,0);

X_20:=IF(X_6=1 AND REF(X_9,1)<REF(X_8,1) AND (X_9>=4 OR HHV(X_7,X_9)=1),1,0);

X_21:=X_9<4 AND HHV(X_7,X_9)!=1 OR REF(X_18,X_9)=0;

X_22:=X_6=1 AND REF(X_9,1)<REF(X_8,1);

X_23:=X_11>REF(X_10,X_9+1) AND X_11>REF(X_10,X_9) AND X_11>REF(X_11,REF(BARSLAST(X_6=1),X_8+1)+X_8+1);

X_24:=X_21 AND X_22 AND X_23;

X_25:=IF(X_19=1 OR X_20=1 OR X_24,1,0);

X_26:=BARSLAST(X_25=1);

X_27:=BARSLAST(X_18=(-1));

X_28:=IF(X_18=(-1) AND REF(X_26,1)>REF(X_27,1) AND LLV(LOW,X_26+1)<REF(LLV(LOW,X_26+1),1),(-1),0);

X_29:=IF(X_18=(-1) AND REF(X_26,1)<REF(X_27,1) AND (X_26>=4 OR LLV(X_7,X_26)=(-1) OR LOW<REF(LLV(LOW,X_27+1),1)),(-1),0);

X_30:=X_26<4 AND COUNT(X_7=(-1),X_26)<1;

X_31:=X_18=(-1) AND REF(X_26,1)<REF(X_27,1);

X_32:=X_10>REF(X_11,X_26+1) AND X_10>REF(X_11,X_26) AND X_10>REF(X_10,REF(BARSLAST(X_18=(-1)),X_27+1)+X_27+1);

X_33:=X_30 AND X_31 AND X_32;

X_34:=IF(X_28=(-1) OR X_29=(-1) OR X_33,(-1),0);

X_35:=IF(X_25=1 AND REF(X_27,1)>REF(X_26,1) AND HHV(HIGH,X_27+1)>REF(HHV(HIGH,X_27+1),1),1,0);

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 COUNT(X_7=(-1),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:=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_67:=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_68:=REF(BARSLAST(X_66=(-1)),1)+1;

X_69:=REF(BARSLAST(X_66=(-1)),X_68+1)+X_68+1;

X_70:=REF(BARSLAST(X_67=1),1)+1;

X_71:=REF(BARSLAST(X_67=1),X_70+1)+X_70+1;

高到低:IF(X_66=(-1),ATAN((LOW-REF(HIGH,X_70))/REF(HIGH,X_70)/X_70*100)/3.141593*180,DRAWNULL),CIRCLEDOT,COLORBLUE;

低到高:IF(X_67=1,ATAN((HIGH-REF(LOW,X_68))/REF(LOW,X_68)/X_68*100)/3.141593*180,DRAWNULL),CIRCLEDOT,COLORMAGENTA;

NOTEXT1:DRAWLINE(X_67=1,低到高,X_66=(-1),高到低,0),DOTLINE,COLOR99CCFF;

NOTEXT2:DRAWLINE(X_66=(-1),高到低,X_67=1,低到高,0),DOTLINE,COLOR000066;

PLOYLINE(X_67=1,低到高),COLORRED;

PLOYLINE(X_66=(-1),高到低),COLORGREEN;

跌坡度:DRAWNUMBER(X_66=(-1),高到低*1.3,高到低),COLORGREEN;

涨坡度:DRAWNUMBER(X_67=1,低到高*1.3,低到高),COLORRED;

X_72:=X_67=1 AND HIGH>REF(HIGH,X_70) AND 低到高<REF(低到高,X_70);

X_73:=X_66=(-1) AND LOW<REF(LOW,X_68) AND 高到低>REF(高到低,X_68);

DRAWICON(X_72,低到高,2);

DRAWICON(X_73,高到低,1);

 通达信坡度几何副图源码

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。如发现有害或侵权内容,请点击这里 或 拨打24小时举报电话:4000070609 与我们联系。

    猜你喜欢

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多
    喜欢该文的人也喜欢 更多