通达信【启动黑马】副图 强势黑马启动尽在掌握 源码 附图
{启动黑马幅图源码如下}
X_6:=1;
X_7:=CLOSE*VOL;
X_8:=EMA((EMA(X_7,3)/EMA(VOL,3)+EMA(X_7,6)/EMA(VOL,6)+EMA(X_7,12)/EMA(VOL,12)+EMA(X_7,24)/EMA(VOL,24))/4,13);
X_9:=(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;
X_10:=X_9;
X_11:=X_7;
X_12:=X_8;
X_13:=1.06*X_12;
X_14:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>6;
X_15:=EMA(HIGH,10)*(1+6/100);
X_16:=X_6 AND X_14>0 AND CROSS(CLOSE,X_15) AND CROSS(CLOSE,X_13);
黑马启动:X_6 AND X_16,COLORRED;
{启动黑马源码如下}
DRAWGBK(CLOSE>0,RGB(0,0,0),RGB(0,50,50),0,1,0);
X_1:=VOL;
X_2:=SMA((CLOSE-REF(CLOSE,1))*X_1,3,1)/10000;
X_3:=EMA(X_2,12)-EMA(X_2,26);
X_4:=EMA(X_3,9);
X_5:=(X_3-X_4)*2;
主力资金:X_5,NODRAW,COLORYELLOW;
流入:CROSS(X_5,0),NODRAW,COLORRED;
DRAWICON(CROSS(X_5,0),REF(X_5,1),38);
流出:CROSS(0,X_5),NODRAW,COLORGREEN;
DRAWICON(CROSS(0,X_5),REF(X_5,1),39);
X_6:=1;
X_7:=CLOSE*VOL;
X_8:=EMA((EMA(X_7,3)/EMA(VOL,3)+EMA(X_7,6)/EMA(VOL,6)+EMA(X_7,12)/EMA(VOL,12)+EMA(X_7,24)/EMA(VOL,24))/4,13);
X_9:=(EMA(CLOSE,5)*7+EMA(CLOSE,10)*3)/10;
X_10:=X_9;
X_11:=X_7;
X_12:=X_8;
X_13:=1.06*X_12;
X_14:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100>6;
X_15:=EMA(HIGH,10)*(1+6/100);
X_16:=X_6 AND X_14>0 AND CROSS(CLOSE,X_15) AND CROSS(CLOSE,X_13);
X_17:=FILTER(CROSS(X_10,EMA(HIGH,55)*(1+10/100)),5);
黑马启动:IF(X_6 AND X_16,1,0),NODRAW,COLORRED;
非妖即顶:IF(X_6 AND X_17,1,0),NODRAW,COLORMAGENTA;
STICKLINE(X_5>0 AND X_5>=REF(X_5,1),X_5,0,3,1),COLORRED;
STICKLINE(X_5>0 AND X_5<REF(X_5,1),X_5,0,3,1),COLORGREEN;
STICKLINE(X_5<0,X_5,0,3,1),COLORCYAN;
STICKLINE(黑马启动>0,X_5,0,4,0),COLORRED;
STICKLINE(非妖即顶>0,X_5,0,4,0),COLORMAGENTA;
X_18:=X_6;
X_19:=IF(X_6<=0,0,HHVBARS(X_5,BARSLAST(X_5<0)+1));
X_20:=IF(X_18>0,CROSS(BACKSET(CROSS(0,X_5),REF(X_19,1)+2),0.5),0);
X_21:=CROSS(BACKSET(CROSS(0,X_5) OR (ISLASTBAR AND X_5>0),REF(X_19,1)+2),0.5);
X_22:=DRAWLINE(X_20,X_5,REF(X_20,1),REF(X_5,1),1);
NOTEXT前高:X_22,COLORGRAY;
X_23:=LLVBARS(X_5,BARSLAST(X_5>0)+1);
X_24:=CROSS(BACKSET(CROSS(X_5,0),REF(X_23,1)+2),0.5);
X_25:=BARSLAST(FILTERX(CROSS(0,X_5),BARSCOUNT(CLOSE)));
X_26:=DRAWLINE(X_24,X_5,REF(X_24,1),REF(X_5,1),1);
NOTEXT前低:X_26,COLORGRAY;
X_27:=IF(X_5<0,FILTERX(X_5=LLV(X_5,BARSLAST(X_5>0)),BARSCOUNT(CLOSE)),DRAWNULL);
X_28:=BARSLAST(X_27);
X_29:=FILTERX(X_5<CONST(LLV(X_5,X_25+1)),BARSCOUNT(CLOSE));
X_30:=BARSLAST(X_29);
X_31:=IF(X_25+1>=1,CONST(LLV(X_5,X_25+1)),DRAWNULL);
NOTEXT本低:X_31,COLORWHITE;
X_32:=CROSS(COUNT(CROSS(X_5>X_31/2 AND X_5<0,0.5),X_28)=1,0.5) AND X_28>=0;
X_33:=IF(ISLASTBAR AND X_5>0 AND X_5=HHV(X_5,BARSLAST(X_5<0)),1,IF(FILTERX(X_21,BARSCOUNT(CLOSE)),2,DRAWNULL));
X_34:=X_33=1 OR X_33=2 AND X_5>0;
X_35:=FILTERX(X_34,BARSCOUNT(CLOSE));
X_36:=DRAWLINE(X_35,X_5,REF(X_35,1),REF(X_5,1),1);
NOTEXT本高:X_36,COLORWHITE;
X_37:=CONST(REF(X_5,BARSLAST(X_35)));
X_38:=X_5>X_37;
X_39:=FILTERX(REFX(BARSLAST(X_38),1)=1,BARSCOUNT(CLOSE));
NOTEXT天数:BARSLAST(X_39),NODRAW,COLORYELLOW;
NOTEXT上横线:DRAWLINE(X_39,X_37,X_35,X_37,0),DOTLINE,COLORGREEN;
NOTEXT下横线:DRAWLINE(X_29,CONST(LLV(X_5,X_25+1)),X_27=1,X_5,0),DOTLINE,COLORYELLOW;
X_40:=IF(X_39,BARSNEXT(X_35),DRAWNULL);
X_41:=IF(NOTEXT天数>0 AND NOTEXT天数<=REF(X_40,NOTEXT天数),SUM(X_5>0,NOTEXT天数),DRAWNULL);
X_42:=REF(CLOSE,NOTEXT天数);
X_43:=(X_42-CLOSE)/CLOSE*100;
X_44:=BARSLAST(X_35);
X_45:=CROSS(COUNT(CROSS(X_5<X_36/2 AND X_5>0,0.5),X_35)=1,0.5) AND X_35>=0;
STICKLINE(X_5>X_22 AND X_36>X_22 AND BARSLAST(CROSS(X_5<X_36/2,0.5))>0 AND X_5>(X_22+X_36)/2,X_5,X_22,1,0),COLORYELLOW;
X_46:=IF(X_5>0 AND X_36!=X_22,DRAWLINE(X_45,(X_22+X_36)/2,REF(X_45,1),REF((X_22+X_36)/2,1),1),DRAWNULL);
STICKLINE(X_5>X_22,X_5,X_22,1,0),COLORYELLOW;
STICKLINE(X_45,X_5,0,1,0),COLORGREEN;
STICKLINE(X_5<0 AND X_5<X_26 AND X_26<0,X_5,X_26,1,0),COLORBLUE;
X_47:=IF(CROSS(X_5<0,0.5),BARSNEXT(X_27),DRAWNULL);
X_48:=BARSLAST(X_5>0)-1;
VAR1G:=(((CLOSE / MA(CLOSE,40)) * 100) < 78);
VAR2G:=(((CLOSE / MA(CLOSE,60)) * 100) < 74);
VAR3G:=(HIGH > (LOW * 1.051));
VAR4G:=(VAR3G AND (COUNT(VAR3G,5) > 1));
AAF:=IF((VAR4G AND (VAR1G OR VAR2G)),2,0);
BF:=C/REF(C,25)<=1.1;
CCF1:=(SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100)<15;
V3F:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
操盘线:=SMA(V3F,2,1);
抄底:=IF(操盘线>REF(操盘线,1) AND REF(操盘线,1)<REF(操盘线,2) AND 操盘线<23 ,1.5,0);
百分之七十六:BF AND AAF AND CCF1 AND 抄底,COLORRED;
AE9:=(C/MA(C,48))<0.75;
AE10:=(C/MA(C,70))<0.70;
AE11:=AE9 AND AE10;
AE12:=V<REF(V,1)*2.8 AND (COUNT(C<O*0.93,2)=2 OR COUNT(H/L>1.1,5)>3);
AE13:=AE11 AND ((C-L)/C>0.02 OR C>REF(C,1)*1.01) AND AE12;
百分之九十二:FILTER(AE13,3),COLORYELLOW;
VAR1:=DMA(CLOSE,VOL/SUM(VOL,34));
VAR2:=DMA(CLOSE,VOL/SUM(VOL,13));
VAR3:=(CLOSE-VAR1)/VAR1*100;
VAR4:=(CLOSE-VAR2)/VAR2*100;
XG3:VAR4<=-28 AND VAR3<=-19,COLORF2A3A4;
LS:=((CLOSE)/(REF(CLOSE,1))>1.048) AND (CLOSE=HIGH) AND BETWEEN(FORCAST(VOL,4),(0.2)*(FORCAST(VOL,12)),(2.1)*(FORCAST(VOL,12)));
拉升:(FILTER(LS,28)){,LINETHICK2};
LOWV:=LLV(LOW,9);
HIGHV:=HHV(HIGH,9);
RSV:=EMA((CLOSE-LOWV)/(HIGHV-LOWV)*100,3);
K:=EMA(RSV,3);
D:=MA(K,3);
XG6:CLOSE<MA(CLOSE,30)*0.8 AND CLOSE>MA(CLOSE,3) AND MA(CLOSE,3)>MA(CLOSE,5);
VATR1G:=(((CLOSE / MA(CLOSE,40)) * 100) < 78);
VATR2G:=(((CLOSE / MA(CLOSE,60)) * 100) < 74);
VATR3G:=(HIGH > (LOW * 1.051));
VATR4G:=(VATR3G AND (COUNT(VATR3G,5) > 1));
AA:=IF((VATR4G AND (VATR1G OR VATR2G)),2,0);
BX:=C/REF(C,25)<=1.1;
CCF:=(SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100)<15;
V3:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
操盘线1:=SMA(V3,2,1);
抄底1:=IF(操盘线1>REF(操盘线1,1) AND REF(操盘线1,1)<REF(操盘线1,2) AND 操盘线1<23 ,1.5,0);
买就赢利:=BX AND AA AND CCF AND 抄底1;
E9:=(C/MA(C,48))<0.75;
E10:=(C/MA(C,70))<0.70;
E11:=E9 AND E10;
E12:=V<REF(V,1)*2.8 AND (COUNT(C<O*0.93,2)=2 OR COUNT(H/L>1.1,5)>3);
E13:=E11 AND ((C-L)/C>0.02 OR C>REF(C,1)*1.01) AND E12;
XG:=FILTER(E13,3);
VATR1:=DMA(CLOSE,VOL/SUM(VOL,34));
VATR2:=DMA(CLOSE,VOL/SUM(VOL,13));
VATR3:=(CLOSE-VATR1)/VATR1*100;
VATR4:=(CLOSE-VATR2)/VATR2*100;
XG2:=VATR4<=-28 AND VATR3<=-19;
百分之九十五:(买就赢利 OR XG2 ) AND XG;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
该公式包含未来函数:BARSNEXT
该公式包含未来函数:REFX
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{启动黑马幅图源码如下}X_6赋值:1
X_7赋值:收盘价*成交量
X_8赋值:EMA((EMA(X_7,3)/EMA(成交量,3)+EMA(X_7,6)/EMA(成交量,6)+EMA(X_7,12)/EMA(成交量,12)+EMA(X_7,24)/EMA(成交量,24))/4,13)
X_9赋值:(收盘价的5日指数移动平均*7+收盘价的10日指数移动平均*3)/10
X_10赋值:X_9
X_11赋值:X_7
X_12赋值:X_8
X_13赋值:1.06*X_12
X_14赋值:(收盘价-1日前的收盘价)/1日前的收盘价*100>6
X_15赋值:最高价的10日指数移动平均*(1+6/100)
X_16赋值:X_6 AND X_14>0 AND 收盘价上穿X_15 AND 收盘价上穿X_13
输出黑马启动:X_6 AND X_16,COLORRED
{启动黑马源码如下}DRAWGBK(收盘价>0,RGB(0,0,0),RGB(0,50,50),0,1,0)
X_1赋值:成交量
X_2赋值:SMA((收盘价-1日前的收盘价)*X_1,3,1)/10000
X_3赋值:X_2的12日指数移动平均-X_2的26日指数移动平均
X_4赋值:X_3的9日指数移动平均
X_5赋值:(X_3-X_4)*2
输出主力资金:X_5,NODRAW,画黄色
输出流入:X_5上穿0,NODRAW,COLORRED
DRAWICON(X_5上穿0,1日前的X_5,38)
输出流出:0上穿X_5,NODRAW,画绿色
DRAWICON(0上穿X_5,1日前的X_5,39)
X_6赋值:1
X_7赋值:收盘价*成交量
X_8赋值:EMA((EMA(X_7,3)/EMA(成交量,3)+EMA(X_7,6)/EMA(成交量,6)+EMA(X_7,12)/EMA(成交量,12)+EMA(X_7,24)/EMA(成交量,24))/4,13)
X_9赋值:(收盘价的5日指数移动平均*7+收盘价的10日指数移动平均*3)/10
X_10赋值:X_9
X_11赋值:X_7
X_12赋值:X_8
X_13赋值:1.06*X_12
X_14赋值:(收盘价-1日前的收盘价)/1日前的收盘价*100>6
X_15赋值:最高价的10日指数移动平均*(1+6/100)
X_16赋值:X_6 AND X_14>0 AND 收盘价上穿X_15 AND 收盘价上穿X_13
X_17:=FILTER(CROSS(X_10,最高价的55日指数移动平均*(1+10/100)),5)
如果X_6 AND X_16返回1否则返回0
如果X_6 AND X_17返回1否则返回0
STICKLINE(X_5>0 AND X_5>=1日前的X_5,X_5,0,3,1),COLORRED
STICKLINE(X_5>0 AND X_5<1日前的X_5,X_5,0,3,1),画绿色
当满足条件X_5<0时,在X_5和0之间画柱状线
当满足条件黑马启动>0时,在X_5和0之间画柱状线
当满足条件非妖即顶>0时,在X_5和0之间画柱状线
X_18:=X_6
X_19:=IF(X_6<=0,0,HHVBARS(X_5,上次X_5<0距今天数+1))
X_20:=IF(X_18>0,CROSS(BACKSET(CROSS(0,X_5),1日前的X_19+2),0.5),0)
X_21:=CROSS(BACKSET(CROSS(0,X_5) OR (ISLASTBAR AND X_5>0),1日前的X_19+2),0.5)
X_22:=DRAWLINE(X_20,X_5,1日前的X_20,1日前的X_5,1)
输出NOTEXT前高:X_22,COLORGRAY
X_23:=LLVBARS(X_5,上次X_5>0距今天数+1)
X_24:=CROSS(BACKSET(CROSS(X_5,0),1日前的X_23+2),0.5)
X_25:=上次FILTERX(0上穿X_5,收盘价的有效数据周期数距今天数)
X_26:=DRAWLINE(X_24,X_5,1日前的X_24,1日前的X_5,1)
输出NOTEXT前低:X_26,COLORGRAY
X_27:=IF(X_5<0,FILTERX(X_5=LLV(X_5,上次X_5>0距今天数),收盘价的有效数据周期数),DRAWNULL)
X_28:=上次X_27距今天数
X_29:=FILTERX(X_5X_30:=上次X_29距今天数
X_31:=IF(X_25+1>=1,CONST(X_25+1日内X_5最低值),DRAWNULL)
输出NOTEXT本低:X_31,画白色
X_32:=CROSS(COUNT(CROSS(X_5>X_31/2 AND X_5<0,0.5),X_28)=1,0.5) AND X_28>=0
X_33:=IF(ISLASTBAR AND X_5>0 AND X_5=HHV(X_5,上次X_5<0距今天数),1,IF(FILTERX(X_21,收盘价的有效数据周期数),2,DRAWNULL))
X_34:=X_33=1 OR X_33=2 AND X_5>0
X_35:=FILTERX(X_34,收盘价的有效数据周期数)
X_36:=DRAWLINE(X_35,X_5,1日前的X_35,1日前的X_5,1)
输出NOTEXT本高:X_36,画白色
X_37:=CONST(REF(X_5,上次X_35距今天数))
X_38:=X_5>X_37
X_39:=FILTERX(REFX(上次X_38距今天数,1)=1,收盘价的有效数据周期数)
输出NOTEXT天数:上次X_39距今天数,NODRAW,画黄色
输出NOTEXT上横线:DRAWLINE(X_39,X_37,X_35,X_37,0),DOTLINE,画绿色
输出NOTEXT下横线:DRAWLINE(X_29,CONST(X_25+1日内X_5最低值),X_27=1,X_5,0),DOTLINE,画黄色
X_40:=IF(X_39,BARSNEXT(X_35),DRAWNULL)
X_41:=IF(NOTEXT天数>0 AND NOTEXT天数<=NOTEXT天数日前的X_40,NOTEXT天数的X_5>0日累和,DRAWNULL)
X_42:=NOTEXT天数日前的收盘价
X_43:=(X_42-收盘价)/收盘价*100
X_44:=上次X_35距今天数
X_45:=CROSS(COUNT(CROSS(X_50,0.5),X_35)=1,0.5) AND X_35>=0
STICKLINE(X_5>X_22 AND X_36>X_22 AND 上次X_50 AND X_5>(X_22+X_36)/2,X_5,X_22,1,0),画黄色
X_46:=IF(X_5>0 AND X_36!=X_22,DRAWLINE(X_45,(X_22+X_36)/2,1日前的X_45,REF((X_22+X_36)/2,1),1),DRAWNULL)
当满足条件X_5>X_22时,在X_5和X_22之间画柱状线
当满足条件X_45时,在X_5和0之间画柱状线
当满足条件X_5<0 AND X_5X_47:=IF(X_5<0上穿0.5,BARSNEXT(X_27),DRAWNULL)
X_48:=上次X_5>0距今天数-1
VAR1G赋值:(((收盘价 / 收盘价的40日简单移动平均) * 100) < 78)
VAR2G赋值:(((收盘价 / 收盘价的60日简单移动平均) * 100) < 74)
VAR3G赋值:(最高价 > (最低价 * 1.051))
VAR4G赋值:(VAR3G AND (统计5日满足VAR3G的天数 > 1))
AAF赋值:IF((VAR4G AND (VAR1G OR VAR2G)),2,0)
BF赋值:C/25日前的C<=1.1
CCF1赋值:(SMA(C-2日前的C和0较大值,7,1)/SMA(C-2日前的C的绝对值,7,1)*100)<15
V3F赋值:(收盘价-8日内最低价最低值)/(8日内最高价最高值-8日内最低价最低值)*100
V3F的2日[1日权重]移动平均
抄底赋值:IF(操盘线>1日前的操盘线 AND 1日前的操盘线<2日前的操盘线 AND 操盘线<23 ,1.5,0)
输出百分之七十六:BF AND AAF AND CCF1 AND 抄底,COLORRED
AE9赋值:(C/C的48日简单移动平均)<0.75
AE10赋值:(C/C的70日简单移动平均)<0.70
AE11赋值:AE9 AND AE10
AE12赋值:V<1日前的V*2.8 AND (统计2日满足C1.1的天数>3)
AE13赋值:AE11 AND ((C-L)/C>0.02 OR C>1日前的C*1.01) AND AE12
输出百分之九十二:AE13的3过滤,画黄色
VAR1赋值:D收盘价的成交量/34的成交量日累和日简单移动平均
VAR2赋值:D收盘价的成交量/13的成交量日累和日简单移动平均
VAR3赋值:(收盘价-VAR1)/VAR1*100
VAR4赋值:(收盘价-VAR2)/VAR2*100
输出XG3:VAR4<=-28 AND VAR3<=-19,COLORF2A3A4
LS赋值:((收盘价)/(1日前的收盘价)>1.048) AND (收盘价=最高价) AND BETWEEN(FORCAST(成交量,4),(0.2)*(FORCAST(成交量,12)),(2.1)*(FORCAST(成交量,12)))
输出拉升:(LS的28过滤){,LINETHICK2}
LOWV赋值:9日内最低价最低值
HIGHV赋值:9日内最高价最高值
RSV赋值:EMA((收盘价-LOWV)/(HIGHV-LOWV)*100,3)
K赋值:RSV的3日指数移动平均
D赋值:K的3日简单移动平均
输出XG6:收盘价<收盘价的30日简单移动平均*0.8 AND 收盘价>收盘价的3日简单移动平均 AND 收盘价的3日简单移动平均>收盘价的5日简单移动平均
VATR1G赋值:(((收盘价 / 收盘价的40日简单移动平均) * 100) < 78)
VATR2G赋值:(((收盘价 / 收盘价的60日简单移动平均) * 100) < 74)
VATR3G赋值:(最高价 > (最低价 * 1.051))
VATR4G赋值:(VATR3G AND (统计5日满足VATR3G的天数 > 1))
AA赋值:IF((VATR4G AND (VATR1G OR VATR2G)),2,0)
BX赋值:C/25日前的C<=1.1
CCF赋值:(SMA(C-2日前的C和0较大值,7,1)/SMA(C-2日前的C的绝对值,7,1)*100)<15
V3赋值:(收盘价-8日内最低价最低值)/(8日内最高价最高值-8日内最低价最低值)*100
V3的2日[1日权重]移动平均
抄底1:=IF(操盘线1>1日前的操盘线1 AND 1日前的操盘线1<2日前的操盘线1 AND 操盘线1<23 ,1.5,0)
买就赢利赋值:BX AND AA AND CCF AND 抄底1
E9赋值:(C/C的48日简单移动平均)<0.75
E10赋值:(C/C的70日简单移动平均)<0.70
E11赋值:E9 AND E10
E12赋值:V<1日前的V*2.8 AND (统计2日满足C1.1的天数>3)
E13赋值:E11 AND ((C-L)/C>0.02 OR C>1日前的C*1.01) AND E12
XG赋值:E13的3过滤
VATR1赋值:D收盘价的成交量/34的成交量日累和日简单移动平均
VATR2赋值:D收盘价的成交量/13的成交量日累和日简单移动平均
VATR3赋值:(收盘价-VATR1)/VATR1*100
VATR4赋值:(收盘价-VATR2)/VATR2*100
XG2:=VATR4<=-28 AND VATR3<=-19
输出百分之九十五:(买就赢利 OR XG2 ) AND XG