最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信撑压线指标源码

    正文概述    2024-04-13 08:42:38  

    {公式名称: 撑压线指标

    公式描述: 1.1模拟版

    无参数

    公式类型: 技术指标公式-其他类型

    画线方法: 主图叠加

    公式版本: 0

    显示小数: 缺省位数

    坐标线位置: 自动

    额外Y轴分界: 无

    参数精灵:无

    用法注释:无

    公式源码:}

    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)

    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)

    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)

    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);

    NOTEXT1:DRAWLINE(X_67=1,HIGH,X_66=(-1),LOW,0),COLORGRAY;

    NOTEXT2:DRAWLINE(X_66=(-1),LOW,X_67=1,HIGH,0),COLORGRAY;

    NOTEXT极点:IF(X_66=(-1),LOW,IF(X_67=1,HIGH,DRAWNULL)),CIRCLEDOT,COLOR00CCCC;

    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;

    X_72:=ATAN((REF(LOW,X_68)-REF(LOW,X_69))/REF(LOW,X_69)/(X_69-X_68)*100)/3.141593*180;

    X_73:=ATAN((REF(HIGH,X_70)-REF(HIGH,X_71))/REF(HIGH,X_71)/(X_71-X_70)*100)/3.141593*180;

    X_74:=X_66=(-1) AND BACKSET(ISLASTBAR,X_69+1);

    X_75:=X_66=(-1) AND BACKSET(ISLASTBAR,X_68+1);

    X_76:=X_67=1 AND BACKSET(ISLASTBAR,X_71+1);

    X_77:=X_67=1 AND BACKSET(ISLASTBAR,X_70+1);

    压力:REF(HIGH,X_71)*(1+TAN(X_73*3.141593/180)/100*X_71),NODRAW;

    支撑:REF(LOW,X_69)*(1+TAN(X_72*3.141593/180)/100*X_69),NODRAW;

    NOTEXT撑:DRAWLINE(X_74,LOW,X_75,LOW,1),COLORRED;

    NOTEXT压:DRAWLINE(X_76,HIGH,X_77,HIGH,1),COLORGREEN;

    X_78:=IF(X_68 X_70,X_70 =4 OR COUNT(X_7=(-1),X_70) 0,0);

    X_79:=IF(X_68 X_70,X_68 =4 OR COUNT(X_7=1,X_68) 0,0);

    X_80:=X_72 =0 AND X_68 X_70 AND REF(HHV(CLOSE,X_70),1) =REF(HIGH,X_70) AND CLOSE REF(HIGH,X_70);

    DRAWICON(BARSSINCEN(X_80,X_70)+1=1,LOW*0.97,28);

    DRAWLINE(X_77,HIGH,BARSSINCEN(X_80,X_70)+1=1,REF(HIGH,X_70),0),DOTLINE,COLORGREEN;

    X_81:=X_78 OR X_79 AND X_72 =0 AND X_73 0 AND 支撑 压力 AND CLOSE

    DRAWICON(BARSSINCEN(X_81,X_70)+1=1,LOW*0.95,29);

    X_82:=X_78 OR X_79 AND X_72 0 AND X_72 X_73 AND X_73 0 AND X_73 (-45) AND CLOSE

    DRAWICON(BARSSINCEN(X_82,X_70)+1=1,LOW*0.93,30);

    通达信撑压线指标源码

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信撑压线指标源码 加入收藏