通达信薛斯通黑马启动与高抛卖点主图指标 供盘中参考使用 源码 附图
X_1:=30;
X_2:=3;
X_3:=15;
X_4:=3;
UPPERL:MA(HIGH,X_1)*(1+X_3/100),COLORWHITE;
UPPERS:MA(HIGH,X_2)*(1+X_4/100),COLORYELLOW;
LOWERS:MA(LOW,X_2)*(1-X_4/100),COLORMAGENTA;
LOWERL:MA(LOW,X_1)*(1-X_3/100),COLORGREEN;
X_5:=REF(CLOSE,1)*1.1-CLOSE<0.01;
STICKLINE(X_5,OPEN,CLOSE,3,0),COLORMAGENTA;
X_6:=CLOSE/REF(CLOSE,1)<0.913 AND CLOSE=LOW;
STICKLINE(X_6,OPEN,CLOSE,2,0),COLORBLUE;
X_7:=HHV(HIGH,20);
X_8:=LLV(LOW,20);
X_9:=REF((X_7/X_8-1)*100<=30,1);
X_10:=REF(CLOSE,1);
X_11:=SMA(MAX(CLOSE-X_10,0),6,1)/SMA(ABS(CLOSE-X_10),6,1)*100;
STICKLINE(CROSS(84,X_11),CLOSE,OPEN,2.8,0),COLORGREEN;
X_12:=ABS(((3.48*CLOSE+HIGH+LOW)/4-EMA(CLOSE,23))/EMA(CLOSE,23));
X_13:=DMA((2.15*CLOSE+LOW+HIGH)/4,X_12);
MA1:MA(CLOSE,5);
X_14:=CLOSE*VOL;
X_15:=EMA((EXPMA(X_14,23)/EXPMA(VOL,23)+EXPMA(X_14,54)/EXPMA(VOL,54)+EXPMA(X_14,108)/EXPMA(VOL,108)+EXPMA(X_14,316)/EXPMA(VOL,316))/4,34);
X_16:=1.0668*X_15;
X_17:=CROSS(CLOSE,X_16) AND REF(CLOSE,1)*1.05-CLOSE<0.005 AND CLOSE>OPEN*0.5;
X_18:=VOL;
X_19:=X_18>MA(VOL,89);
X_20:=EXPMA(CLOSE,5);
X_21:=EXPMA(CLOSE,29);
X_22:=X_20>X_21;
X_23:=REF(CLOSE,1);
X_24:=SMA(MAX(CLOSE-X_23,0),12,1)/SMA(ABS(CLOSE-X_23),12,1)*100;
X_25:=SMA(MAX(CLOSE-X_23,0),56,1)/SMA(ABS(CLOSE-X_23),56,1)*100;
X_26:=X_24>X_25 AND X_22 AND X_19 AND CLOSE>REF(HHV(HIGH,40),1);
DRAWTEXT(X_17 AND X_26 AND X_9,LOW*0.99,'黑马一号'),COLORRED;
STICKLINE(X_17 AND X_26 AND X_9,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(X_17 AND X_26 AND X_9,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(X_17 AND X_26 AND X_9,CLOSE,OPEN,1.5,0),COLORRED;
STICKLINE(X_17 AND X_26 AND X_9,CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE(X_17 AND X_26 AND X_9,OPEN,CLOSE,0.5,0),COLORYELLOW;
X_27:=SUM(IF(CLOSE>REF(CLOSE,1),VOL/CAPITAL*100,IF(CLOSE<REF(CLOSE,1),(-VOL)/CAPITAL*100,0)),0);
X_28:=VOL*CLOSE/100;
X_29:=SUM(IF(X_28/8>20 AND CLOSE>REF(CLOSE,1),X_28,0),0);
X_30:=SUM(IF(X_28/8>20 AND CLOSE<REF(CLOSE,1),X_28,0),0);
X_31:=SUM(IF(X_28/8<20 AND CLOSE>REF(CLOSE,1),X_28,0),0);
X_32:=SUM(IF(X_28/8<20 AND CLOSE<REF(CLOSE,1),X_28,0),0);
X_33:=X_29+X_30+X_31+X_32;
X_34:=1;
X_35:=STRCAT(STRCAT(51,CON2STR(100*X_29/X_33,0)),52);
X_36:=STRCAT(STRCAT(53,CON2STR(100*X_30/X_33,0)),52);
DRAWTEXT_FIX(X_34=1,0.9,0.9,0,X_35),COLORRED;
DRAWTEXT_FIX(X_34=1,0.9,0.99,0,X_36),COLORGREEN;
X_37:=MA(CLOSE,5);
X_38:=MA(CLOSE,10);
X_39:=MA(CLOSE,20);
X_40:=MA(CLOSE,30);
X_41:=MA(CLOSE,55);
X_42:=OPEN<X_37 AND OPEN<X_38 AND OPEN<X_39 AND LOW<X_40 AND LOW<X_41;
X_43:=CLOSE>X_37 AND CLOSE>X_38 AND HIGH>X_39 AND HIGH>X_40 AND HIGH>X_41;
X_44:=X_42 AND X_43;
STICKLINE(X_44,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(X_44,CLOSE,OPEN,2.2,0),COLOR0000CC;
STICKLINE(X_44,CLOSE,OPEN,1.5,0),COLORRED;
STICKLINE(X_44,CLOSE,OPEN,0.5,0),COLORCC66FF;
STICKLINE(X_44,OPEN,CLOSE,0.5,0),COLORYELLOW;
DRAWTEXT(X_44,LOW*0.97,'一穿五'),COLORRED;
X_45:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
X_46:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
X_47:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
X_48:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
X_49:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
X_50:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
X_51:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
X_52:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
X_53:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
X_54:=X_45;
X_55:=X_46+X_48+X_50+X_52;
X_56:=X_47+X_49+X_51+X_53;
B10:IF(X_54>0 OR X_55>0,LOW*0.99,DRAWNULL),CROSSDOT,COLORYELLOW,LINETHICK3;
S1:IF(X_56>0,HIGH*0.99,DRAWNULL),CROSSDOT,COLORGREEN,LINETHICK3;
X_57:=100-90*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20));
X_58:=100-90*(HHV(HIGH,20)-CLOSE)/(HHV(HIGH,20)-LLV(LOW,20));
X_59:=100-MA(100*(HHV(HIGH,5)-CLOSE)/(HHV(HIGH,5)-LLV(LOW,5)),34);
F:IF(CROSS(X_58,MA(X_59,5)),LOW*0.98,DRAWNULL),CROSSDOT,COLORMAGENTA,LINETHICK3;
DRAWTEXT(CROSS(S1,X_56),S1,'逃顶'),COLORWHITE;
DRAWTEXT(CROSS(B10,X_54),B10*1.005,'底'),COLORRED;
DRAWTEXT(CROSS(ZIG(2,3),REF(ZIG(2,3),'启')),LOW*0.997,29),COLORYELLOW,LINETHICK2;
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
X_1赋值:30
X_2赋值:3
X_3赋值:15
X_4赋值:3
输出UPPERL:最高价的X_1日简单移动平均*(1+X_3/100),画白色
输出UPPERS:最高价的X_2日简单移动平均*(1+X_4/100),画黄色
输出LOWERS:最低价的X_2日简单移动平均*(1-X_4/100),画洋红色
输出LOWERL:最低价的X_1日简单移动平均*(1-X_3/100),画绿色
X_5赋值:1日前的收盘价*1.1-收盘价<0.01
当满足条件X_5时,在开盘价和收盘价之间画柱状线
X_6赋值:收盘价/1日前的收盘价<0.913 AND 收盘价=最低价
当满足条件X_6时,在开盘价和收盘价之间画柱状线
X_7赋值:20日内最高价最高值
X_8赋值:20日内最低价最低值
X_9赋值:REF((X_7/X_8-1)*100<=30,1)
X_10:=1日前的收盘价
X_11:=SMA(收盘价-X_10和0较大值,6,1)/SMA(收盘价-X_10的绝对值,6,1)*100
STICKLINE(84上穿X_11,收盘价,开盘价,2.8,0),画绿色
X_12:=((3.48*收盘价+最高价+最低价的绝对值/4-收盘价的23日指数移动平均)/收盘价的23日指数移动平均)
X_13:=DMA((2.15*收盘价+最低价+最高价)/4,X_12)
输出MA1:收盘价的5日简单移动平均
X_14:=收盘价*成交量
X_15:=EMA((X_14的23日指数移动平均/成交量的23日指数移动平均+X_14的54日指数移动平均/成交量的54日指数移动平均+X_14的108日指数移动平均/成交量的108日指数移动平均+X_14的316日指数移动平均/成交量的316日指数移动平均)/4,34)
X_16:=1.0668*X_15
X_17:=收盘价上穿X_16 AND 1日前的收盘价*1.05-收盘价<0.005 AND 收盘价>开盘价*0.5
X_18:=成交量
X_19:=X_18>成交量的89日简单移动平均
X_20:=收盘价的5日指数移动平均
X_21:=收盘价的29日指数移动平均
X_22:=X_20>X_21
X_23:=1日前的收盘价
X_24:=SMA(收盘价-X_23和0较大值,12,1)/SMA(收盘价-X_23的绝对值,12,1)*100
X_25:=SMA(收盘价-X_23和0较大值,56,1)/SMA(收盘价-X_23的绝对值,56,1)*100
X_26:=X_24>X_25 AND X_22 AND X_19 AND 收盘价>REF(40日内最高价最高值,1)
当满足条件X_17 AND X_26 AND X_9时,在最低价*0.99和'黑马一号'位置书写文字
当满足条件X_17 AND X_26 AND X_9时,在收盘价和开盘价之间画柱状线
当满足条件X_17 AND X_26 AND X_9时,在收盘价和开盘价之间画柱状线
当满足条件X_17 AND X_26 AND X_9时,在收盘价和开盘价之间画柱状线
当满足条件X_17 AND X_26 AND X_9时,在收盘价和开盘价之间画柱状线
当满足条件X_17 AND X_26 AND X_9时,在开盘价和收盘价之间画柱状线
X_27:=SUM(IF(收盘价>1日前的收盘价,成交量/当前流通股本*100,IF(收盘价<1日前的收盘价,(-成交量)/当前流通股本*100,0)),0)
X_28:=成交量*收盘价/100
X_29:=SUM(IF(X_28/8>20 AND 收盘价>1日前的收盘价,X_28,0),0)
X_30:=SUM(IF(X_28/8>20 AND 收盘价<1日前的收盘价,X_28,0),0)
X_31:=SUM(IF(X_28/8<20 AND 收盘价>1日前的收盘价,X_28,0),0)
X_32:=SUM(IF(X_28/8<20 AND 收盘价<1日前的收盘价,X_28,0),0)
X_33:=X_29+X_30+X_31+X_32
X_34:=1
X_35:=STRCAT(STRCAT(51,CON2STR(100*X_29/X_33,0)),52)
X_36:=STRCAT(STRCAT(53,CON2STR(100*X_30/X_33,0)),52)
当满足条件X_34=1时,在横轴0.9纵轴0.9位置书写文字
当满足条件X_34=1时,在横轴0.9纵轴0.99位置书写文字
X_37:=收盘价的5日简单移动平均
X_38:=收盘价的10日简单移动平均
X_39:=收盘价的20日简单移动平均
X_40:=收盘价的30日简单移动平均
X_41:=收盘价的55日简单移动平均
X_42:=开盘价
X_43:=收盘价>X_37 AND 收盘价>X_38 AND 最高价>X_39 AND 最高价>X_40 AND 最高价>X_41
X_44:=X_42 AND X_43
当满足条件X_44时,在收盘价和开盘价之间画柱状线
当满足条件X_44时,在收盘价和开盘价之间画柱状线
当满足条件X_44时,在收盘价和开盘价之间画柱状线
当满足条件X_44时,在收盘价和开盘价之间画柱状线
当满足条件X_44时,在开盘价和收盘价之间画柱状线
当满足条件X_44时,在最低价*0.97和'一穿五'位置书写文字
X_45:=IF(TROUGHBARS(3,16,1)=0 AND 最高价>最低价+0.04,4,0)
X_46:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
X_47:=ZIG(3,6)[=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3)]
X_48:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3)
X_49:=ZIG(3,22)[=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3)]
X_50:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3)
X_51:=ZIG(3,51)[=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3)]
X_52:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3)
X_53:=ZIG(3,72)[=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3)]
X_54:=X_45
X_55:=X_46+X_48+X_50+X_52
X_56:=X_47+X_49+X_51+X_53
如果X_54>0 OR X_55>0返回最低价*0.99否则返回DRAWNULL
如果X_56>0返回最高价*0.99否则返回DRAWNULL
X_57:=100-90*(20日内最高价最高值-收盘价)/(20日内最高价最高值-20日内最低价最低值)
X_58:=100-90*(20日内最高价最高值-收盘价)/(20日内最高价最高值-20日内最低价最低值)
X_59:=100-MA(100*(5日内最高价最高值-收盘价)/(5日内最高价最高值-5日内最低价最低值),34)
输出F:IF(CROSS(X_58,X_59的5日简单移动平均),最低价*0.98,DRAWNULL),CROSSDOT,画洋红色, 线宽为3
DRAWTEXT(S1上穿X_56,S1,'逃顶'),画白色
DRAWTEXT(B10上穿X_54,B10*1.005,'底'),画红色
DRAWTEXT(CROSS(ZIG(2,3),REF(ZIG(2,3),'启')),最低价*0.997,29),画黄色, 线宽为2