通达信精品中的精品:撑压线模拟版
{公式名称: 撑压线模拟版
公式描述: 根据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));
- 上一篇公式:通达信圆月弯弓刀源码
- 下一篇公式:通达信撑压线指标源码