以下是通达信精品中的精品:撑压线模拟版

{公式名称: 撑压线模拟版

公式描述: 根据ZGL群主思路模拟

无参数

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

画线方法: 主图叠加

公式版本: 0

显示小数: 缺省位数

坐标线位置: 自动

额外Y轴分界: 无

 

参数精灵:无

用法注释:无

公式源码:}

X_1:=STRCAT(HYBLOCK,14);

X_2:=STRCAT(X_1,DYBLOCK);

X_3:=STRCAT(X_2,13);

DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(X_3,GNBLOCK)),COLOR00C0C0;

X_4:=EMA(CLOSE,12)-EMA(CLOSE,26);

X_5:=EMA(X_4,9);

X_6:=(X_4-X_5)*2;

X_7:=CLOSE>REF(CLOSE,4);

X_8:=BARSLASTCOUNT(X_7);

X_9:=X_8=9;

X_10:=ISLASTBAR AND BETWEEN(X_8,1,8);

X_11:=(BACKSET(X_9>0,9) OR BACKSET(X_10>0,X_8))*X_8;

DRAWTEXT(X_11>0,HIGH*1.05,VAR2STR(X_11,0)),COLORMAGENTA;

DRAWTEXT(X_8=9,HIGH*1.05,3),COLORGREEN;

X_12:=CLOSE<REF(CLOSE,4);

X_13:=BARSLASTCOUNT(X_12);

X_14:=X_13=9;

X_15:=ISLASTBAR AND BETWEEN(X_13,1,8);

X_16:=(BACKSET(X_14>0,9) OR BACKSET(X_15>0,X_13))*X_13;

DRAWTEXT(X_16>0,LOW*0.95,VAR2STR(X_16,0)),COLORMAGENTA;

DRAWTEXT(X_13=9,LOW*0.95,3),COLORRED;

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

X_18:=BACKSET(X_17=0 AND REF(X_17,1)=1,2);

X_19:=IF(X_18=1 AND REF(X_18,1)=0,(-1),0);

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

X_21:=BACKSET(X_20=0 AND REF(X_20,1)=1,2);

X_22:=IF(X_21=1 AND REF(X_21,1)=0,1,0);

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

X_24:=BARSLAST(X_22=1);

X_25:=BARSLAST(X_19=(-1));

X_26:=LOWRANGE(LOW);

X_27:=TOPRANGE(HIGH);

X_28:=IF(X_19=(-1) AND REF(X_24,1)>REF(X_25,1) AND LLV(LOW,X_24+1)<REF(LLV(LOW,X_24+1),1),(-1),0);

X_29:=IF(X_19=(-1) AND REF(X_24,1)<REF(X_25,1) AND (X_24>=4 OR LLV(X_23,X_24)=(-1) OR LOW<REF(LLV(LOW,X_25+1),1)),(-1),0);

X_30:=X_24<4 AND HHV(X_23,X_24)!=(-1);

X_31:=X_19=(-1) AND REF(X_24,1)<REF(X_25,1);

X_32:=X_26>REF(X_27,X_24+1) AND X_26>REF(X_27,X_24) AND X_26>REF(X_26,REF(BARSLAST(X_19=(-1)),X_25+1)+X_25+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_22=1 AND REF(X_25,1)>REF(X_24,1) AND HHV(HIGH,X_25+1)>REF(HHV(HIGH,X_25+1),1),1,0);

X_36:=IF(X_22=1 AND REF(X_25,1)<REF(X_24,1) AND (X_25>=4 OR HHV(X_23,X_25)=1),1,0);

X_37:=X_25<4 AND HHV(X_23,X_25)!=1 OR REF(X_34,X_25)=0;

X_38:=X_22=1 AND REF(X_25,1)<REF(X_24,1);

X_39:=X_27>REF(X_26,X_25+1) AND X_27>REF(X_26,X_25) AND X_27>REF(X_27,REF(BARSLAST(X_22=1),X_24+1)+X_24+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_23,X_42)=(-1) OR LOW<REF(LLV(LOW,X_43+1),1)),(-1),0);

X_46:=X_42<4 AND HHV(X_23,X_42)!=(-1);

X_47:=X_34=(-1) AND REF(X_42,1)<REF(X_43,1);

X_48:=X_26>REF(X_27,X_42+1) AND X_26>REF(X_27,X_42) AND X_26>REF(X_26,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_23,X_43)=1),1,0);

X_53:=X_43<4 AND HHV(X_23,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_27>REF(X_26,X_43+1) AND X_27>REF(X_26,X_43) AND X_27>REF(X_27,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:=IF(X_50=(-1) AND REF(X_58,1)>REF(X_59,1) AND LLV(LOW,X_58+1)<REF(LLV(LOW,X_58+1),1),(-1),0);

X_61:=IF(X_50=(-1) AND REF(X_58,1)<REF(X_59,1) AND (X_58>=4 OR LLV(X_23,X_58)=(-1) OR LOW<REF(LLV(LOW,X_59+1),1)),(-1),0);

X_62:=X_58<4 AND HHV(X_23,X_58)!=(-1);

X_63:=X_50=(-1) AND REF(X_58,1)<REF(X_59,1);

X_64:=X_26>REF(X_27,X_58+1) AND X_26>REF(X_27,X_58) AND X_26>REF(X_26,REF(BARSLAST(X_50=(-1)),X_59+1)+X_59+1);

X_65:=X_62 AND X_63 AND X_64;

X_66:=IF(X_60=(-1) OR X_61=(-1) OR X_65,(-1),0);

X_67:=IF(X_57=1 AND REF(X_59,1)>REF(X_58,1) AND HHV(HIGH,X_59+1)>REF(HHV(HIGH,X_59+1),1),1,0);

X_68:=IF(X_57=1 AND REF(X_59,1)<REF(X_58,1) AND (X_59>=4 OR HHV(X_23,X_59)=1),1,0);

X_69:=X_59<4 AND HHV(X_23,X_59)!=1 OR REF(X_50,X_59)=0;

X_70:=X_57=1 AND REF(X_59,1)<REF(X_58,1);

X_71:=X_27>REF(X_26,X_59+1) AND X_27>REF(X_26,X_59) AND X_27>REF(X_27,REF(BARSLAST(X_57=1),X_58+1)+X_58+1);

X_72:=X_69 AND X_70 AND X_71;

X_73:=IF(X_67=1 OR X_68=1 OR X_72,1,0);

X_74:=BARSLAST(X_73=1);

X_75:=BARSLAST(X_66=(-1));

X_76:=REF(BARSLAST(X_73=1),X_74+1)+X_74+1;

X_77:=REF(BARSLAST(X_66=(-1)),X_75+1)+X_75+1;

X_78:=BACKSET(X_66=(-1) AND REF(X_74,1)<REF(X_75,1),X_74+1);

X_79:=BACKSET(X_66=(-1) AND REF(X_74,1)>REF(X_75,1),X_77+1);

X_80:=BACKSET(X_73=1 AND REF(X_74,1)>REF(X_75,1),X_75+1);

X_81:=BACKSET(X_73=1 AND REF(X_74,1)<REF(X_75,1),X_76+1);

X_82:=BACKSET(NOT(X_66=(-1) OR X_73=1) AND X_74>X_75 AND X_75>=5 AND CLOSE>REF(LOW,X_75),X_75+1);

X_83:=BACKSET(NOT(X_66=(-1) OR X_73=1) AND X_74<X_75 AND X_74>=5 AND CLOSE<REF(LOW,X_74),X_74+1);

X_84:=IF(X_66=(-1) AND (X_78+X_80=2 OR X_79+X_80=2 OR X_78+X_81=2 OR X_82=1),(-1),0);

X_85:=IF(X_73=1 AND (X_78+X_80=2 OR X_79+X_80=2 OR X_78+X_81=2 OR X_83=1),1,0);

NOTEXT1A:DRAWLINE(X_85=1,HIGH,X_84=(-1),LOW,0),DOTLINE,COLORGRAY;

NOTEXT2A:DRAWLINE(X_84=(-1),LOW,X_85=1,HIGH,0),DOTLINE,COLORGRAY;

X_86:=IF(X_66=(-1) AND (X_78+X_80=2 OR X_79+X_80=2 OR X_78+X_81=2),(-1),0);

X_87:=IF(X_73=1 AND (X_78+X_80=2 OR X_79+X_80=2 OR X_78+X_81=2),1,0);

NOTEXT1:DRAWLINE(X_87=1,HIGH,X_86=(-1),LOW,0),COLORGRAY;

NOTEXT2:DRAWLINE(X_86=(-1),LOW,X_87=1,HIGH,0),COLORGRAY;

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

X_88:=REF(BARSLAST(X_86=(-1)),1)+1;

X_89:=REF(BARSLAST(X_86=(-1)),X_88+1)+X_88+1;

X_90:=REF(BARSLAST(X_87=1),1)+1;

X_91:=REF(BARSLAST(X_87=1),X_90+1)+X_90+1;

X_92:=ATAN((REF(LOW,X_88)-REF(LOW,X_89))/REF(LOW,X_89)/(X_89-X_88)*100)/3.141593*180;

X_93:=ATAN((REF(HIGH,X_90)-REF(HIGH,X_91))/REF(HIGH,X_91)/(X_91-X_90)*100)/3.141593*180;

X_94:=X_86=(-1) AND BACKSET(ISLASTBAR,X_89+1);

X_95:=X_86=(-1) AND BACKSET(ISLASTBAR,X_88+1);

X_96:=X_87=1 AND BACKSET(ISLASTBAR,X_91+1);

X_97:=X_87=1 AND BACKSET(ISLASTBAR,X_90+1);

支撑线:DRAWLINE(X_94,LOW,X_95,LOW,1),COLORRED;

压力线:DRAWLINE(X_96,HIGH,X_97,HIGH,1),COLORGREEN;

X_98:=X_92>=0 AND X_88<X_90 AND REF(HHV(CLOSE,X_90),1)<=REF(HIGH,X_90) AND CLOSE>REF(HIGH,X_90);

DRAWICON(BARSSINCEN(X_98,X_90)+1,LOW*0.97,28);

DRAWLINE(X_97,HIGH,BARSSINCEN(X_98,X_90)+1=1,REF(HIGH,X_90),0),DOTLINE,COLORGREEN;

X_99:=X_92>=0 AND X_93<0 AND 支撑线<压力线 AND CROSS(CLOSE,压力线);

DRAWICON(BARSSINCEN(X_99,X_90)+1,LOW*0.95,29);

X_100:=X_92<0 AND X_92>X_93 AND X_93<0 AND X_93>(-45) AND CROSS(CLOSE,压力线);

DRAWICON(BARSSINCEN(X_100,X_90)+1,LOW*0.93,30);

 

{公式名称: 撑压线选股

公式描述: 根据ZGL群主思路模拟

无参数

公式类型: 条件选股公式-其他类型

公式版本: 0

 

参数精灵:无

用法注释:无

公式源码:}

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 HHV(X_7,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 HHV(X_7,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 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;
 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。