牛股分时 分时突破通达信公式 主图 源码附图
ZX:=DYNAINFO(3);
价位轴:ZX,COLORLICYAN;
DIFF0:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA0:= EMA(DIFF0,9);
攻击:=2*(DIFF0-DEA0)*2, COLORSTICK;
STICKLINE(攻击>REF(攻击,1) AND DIFF0>DEA0,攻击+ZX,ZX,1,0),COLORRED;
STICKLINE(攻击<REF(攻击,1) AND 攻击>0,攻击+ZX,ZX,1,0),COLORGREEN;
STICKLINE(攻击<REF(攻击,1) AND 攻击<0,攻击+ZX,ZX,1,0),COLORGREEN;
STICKLINE(攻击>REF(攻击,1) AND 攻击<0,攻击+ZX,ZX,1,0),COLORYELLOW;
分时顶:HHV(H,480),COLORRED,LINETHICK2;
现价:C,COLORWHITE,LINETHICK2;
W1:=C=HHV(C,20);
W2:=BARSLAST(W1);
W3:=IF(W2>0,REF(C,W2),REF(C,W2));
W4:=CROSS(C,REF(W3,1));
{股票指标网 }
均价线:SUM(现价*V,240)/SUM(V,240),COLORYELLOW;
分时压力:MA(REF(HHV(C,30),1),2),COLORMAGENTA;
分时支撑:MA(REF(LLV(C,30),1),2),COLORBLUE;
DRAWICON(W4 AND COUNT(W4,5)=1,分时压力,9);
绝密线:EXPMA(C,17),COLORRED,LINETHICK2;
AA1:=(VOL/CLOSE)/3;
AA2:=SUM((IF(((AA1>40) AND (CLOSE>(REF(CLOSE,1)))),AA1,0)),0);
AA3:=SUM((IF(((AA1>40) AND (CLOSE<(REF(CLOSE,1)))),AA1,0)),0);
AA4:=SUM((IF(((AA1<40) AND (CLOSE>(REF(CLOSE,1)))),AA1,0)),0);
AA5:=SUM((IF(((AA1<40) AND (CLOSE<(REF(CLOSE,1)))),AA1,0)),0);
AA6:=((AA2+AA3)+AA4)+AA5;
AA7:=IF((BARSTATUS=2),((100*AA2)/AA6),0);
AA8:=((IF((BARSTATUS=2),((100*AA3)/AA6),0)));
AA9:=((IF((BARSTATUS=2),((100*AA4)/AA6),0)));
AA10:=((IF((BARSTATUS=2),((100*AA5)/AA6),0)));
机买:=(AA2),LINETHICK0;
机卖:=(AA3),LINETHICK0;
散买:=(AA4);
散卖:=(AA5);
总买:=AA2+AA4;
总卖:=AA3+AA5;
机构买比:=机买/总买*0.1,LINETHICK0;
机构卖比:=机卖/总卖*0.1,LINETHICK0;
最新:CLOSE,LINETHICK2,COLORWHITE;
AAB:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));
BB:=BETWEEN(C/AAB,C+H,C-H);
DRAWTEXT( ISLASTBAR AND 最新>REF(最新,1),最新,STRCAT(' 涨▲',CON2STR(最新,2))),COLORMAGENTA;
DRAWTEXT( ISLASTBAR AND 最新<REF(最新,1),最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00;
均价11:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK2;
TT:=BARSCOUNT(C);
前高:=REF(HHV(H,TT),1);
突破:=CROSS(C,REF(HHV(H,TT),1)){ AND HHVBARS(VOL,TT)=0} AND C/均价11<1.09 AND TT>1 AND TT<240;
主力扫盘:=COUNT(突破,13)>=3 AND CROSS(C,REF(HHV(H,TT),1)){ AND HHVBARS(VOL,TT)=0};
DRAWTEXT(主力扫盘,前高, '←扫盘'),COLORYELLOW;
已主力扫盘:=BARSLAST(主力扫盘)<13;
DRAWTEXT(BARSLAST(主力扫盘)<8,(DYNAINFO(3))*9.5/10 , '↖已扫'),COLORGREEN;
全仓买进:=CROSS(C,REF(HHV(H,TT),1)) AND HHVBARS(VOL,TT)=0 AND C/均价11<1.09 AND TT>1 AND TT<240 AND BARSLAST(主力扫盘)>=21;
DRAWTEXT(全仓买进 ,前高, '←全仓'),COLORCYAN;
VAR1:=EMA(EMA(C,13),13);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
JJJ:=DYNAINFO(11);
P:=55;
S:=8;
M1:=3;
能量:=(EMA(C,S)-EMA(C,P))*10;
空头:=EMA(能量,M1);
BTJ11:=(C-JJJ)/JJJ<-0.03;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ3:=CROSS(能量,空头) AND 能量<-0.3;
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
有庄:=BTJ811;
RSV:=(CLOSE-LLV(LOW,6))/(HHV(HIGH,6)-LLV(LOW,6))*80;
K:=SMA(RSV,2,1);
D:=SMA(K,2,1);
RS:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*80;
K1:=RS>=75;
K2:=RS<80;
HJ_2:=DYNAINFO(4)>0 AND HHV(HIGH,2)/LLV(LOW,2)<1.25 AND REF(CLOSE,1)<LLV(LOW,3)+(HHV(HIGH,3)-LLV(LOW,3))*0.85;
HJ_9:=EMA(CLOSE,2);
HJ_10:=EMA(CLOSE,3);
HJ_11:=MAX(HJ_9,HJ_10);
X2:=CLOSE>HJ_11 AND HJ_2 AND (CLOSE>REF(HHV(HIGH,2),1) AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>0.015);
DRAWTEXT(X2,C*0.999,'←准备注意买进'),COLORGREEN;
{牛熊线}
NX:=MA(((SLOPE(C,20)*5)+C),10);
{中枢}
B1:=HOUR=09 AND MINUTE=45;
B20:=LLV(L,15);
B30:=BARSLAST(B1);
B4:=REF(B20,B30);
B5:CONST(B4),COLORFF80FF,CIRCLEDOT,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=20,B4,'分时支撑'),COLORYELLOW;
C1:=HOUR=09 AND MINUTE=45;
C2:=HHV(H,15);
C3:=BARSLAST(C1);
C4:=REF(C2,C3);
C5:CONST(C4),COLORFF80FF,CIRCLEDOT,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=20,C4,'分时突破'),COLORRED;
{DRAWBAND(C5,RGB(204,204,204),B5,RGB(204,204,204));}
{MACD}
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD10:=(DIF-DEA)*2;
AA0:=MACD10>00 AND DIF>0 AND DEA>0;
{捉牛信号}
A100:=HOUR=10 AND MINUTE=0;
A20:=HHV(H,30);
A30:=BARSLAST(A100);
A40:=REF(A20,A30);
A50:=CONST(A40);
A80:=CLOSE>A50 AND REF(C<=A50,1) AND CLOSE>NX;
AB:=FILTER(A80,100);
A90:=DYNAINFO(3);
AC:=CLOSE<=A90*1.04 AND CLOSE>A90;
量比:=V/REF(MA(V,5),1);
XG:=AA0 AND AB AND AC AND A40>A90 AND 量比>=1;
DRAWICON(XG,A50,23);
{DRAWTEXT(CURRBARSCOUNT=20,A4,'强势区域'),COLORYELLOW;
D1:=HOUR=10 AND MINUTE=0;
D2:=LLV(L,30);
D3:=BARSLAST(D1);
D4:=REF(D2,D3);
D5:CONST(D4),COLOR808080,CIRCLEDOT,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=20,D4,'底部区域'),COLORYELLOW;}
{均线突破中枢}
JJ1:=DAY!=REF(DAY,1);
JJ2:=BARSLAST(V>0 AND JJ1)+1;
JJ:=SUM(V*C,JJ2)/SUM(V,JJ2);
XG2:=CROSS(JJ,C5);
DRAWICON(XG2,JJ,23);
{TS:=(B4+C4)/2;
DRAWTEXT(XG2,TS,'回落靠近黄线买');}
VARA3:=HHV(CLOSE,90);
VARA4:=LLV(CLOSE,90);
VARA5:=VARA3 - VARA4;
VARA6:=EMA((CLOSE - VARA4)/VARA5 - 0.5,14);
ZLSP:=VARA6*20;
VARA7:=REF(HHV(CLOSE,66),2);
VARA8:=CROSS(CLOSE,VARA7) AND (HHV(CLOSE,110)/LLV(CLOSE,110) - 1) * 100 < 45 AND ZLSP < 5.666;
VARA11:=15* FILTER(VARA8,41);
XG0:HHV(H,480),DOTLINE,COLORCYAN;
DRAWTEXT(FILTER(CROSS(C,REF(XG,1)),10) AND C>REF(XG,1),C*0.995,'突'),COLORYELLOW;
RQ:=DATETODAY(DATE)-DATETODAY(REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT))+1;
JY:=BARSLAST((RQ-REF(RQ,1))!=WEEKDAY-REF(WEEKDAY,1) OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1;
MA1:=REF(C,JY);
MA2:=REF(MA1,JY);
MA3:=REF(MA2,JY);
MA4:=REF(MA3,JY);
MA5:=REF(MA4,JY);
MA6:=REF(MA5,JY);
MA7:=REF(MA6,JY);
MA8:=REF(MA7,JY);
MA9:=REF(MA8,JY);
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*8/9,COLORLIRED,DOTLINE;
支撑:L1+P1*0.5/9,COLORGREEN,DOTLINE;
均线:IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW,DOTLINE;
DIFF:=(EMA(CLOSE,12)-EMA(CLOSE,26))+DYNAINFO(3);
DEAA:=EMA(DIFF,9);
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
ZX赋值:DYNAINFO(3)
输出价位轴:ZX,COLORLICYAN
DIFF0赋值: CLOSE的12日指数移动平均 - CLOSE的26日指数移动平均
DEA0赋值: DIFF0的9日指数移动平均
攻击赋值:2*(DIFF0-DEA0)*2, COLORSTICK
如果F0>DEA0返回攻击+ZX否则返回ZX
STICKLINE(攻击<1日前的攻击 AND 攻击>0,攻击+ZX,ZX,1,0),画绿色
STICKLINE(攻击<1日前的攻击 AND 攻击<0,攻击+ZX,ZX,1,0),画绿色
STICKLINE(攻击>1日前的攻击 AND 攻击<0,攻击+ZX,ZX,1,0),画黄色
输出分时顶:480日内H最高值,COLORRED,LINETHICK2
输出现价:C,画白色,LINETHICK2
W1赋值:C=20日内C最高值
W2赋值:上次W1距今天数
W3赋值:IF(W2>0,W2日前的C,W2日前的C)
W4赋值:CROSS(C,1日前的W3)
输出{股票指标网 }
均价线:240的现价*V日累和/240的V日累和,画黄色
输出分时压力:MA(REF(30日内C最高值,1),2),画洋红色
输出分时支撑:MA(REF(30日内C最低值,1),2), 画蓝色
DRAWICON(W4 AND 统计5日满足W4的天数=1,分时压力,9)
输出绝密线:C的17日指数移动平均,COLORRED,LINETHICK2
AA1赋值:(成交量/CLOSE)/3
AA2赋值:SUM((IF(((AA1>40) AND (CLOSE>(1日前的CLOSE))),AA1,0)),0)
AA3赋值:SUM((IF(((AA1>40) AND (CLOSE<(1日前的CLOSE))),AA1,0)),0)
AA4赋值:SUM((IF(((AA1<40) AND (CLOSE>(1日前的CLOSE))),AA1,0)),0)
AA5赋值:SUM((IF(((AA1<40) AND (CLOSE<(1日前的CLOSE))),AA1,0)),0)
AA6赋值:((AA2+AA3)+AA4)+AA5
AA7赋值:IF((BARSTATUS=2),((100*AA2)/AA6),0)
AA8赋值:((IF((BARSTATUS=2),((100*AA3)/AA6),0)))
AA9赋值:((IF((BARSTATUS=2),((100*AA4)/AA6),0)))
AA10:=((IF((BARSTATUS=2),((100*AA5)/AA6),0)))
机买赋值:(AA2),LINETHICK0
机卖赋值:(AA3),LINETHICK0
散买赋值:(AA4)
散卖赋值:(AA5)
总买赋值:AA2+AA4
总卖赋值:AA3+AA5
机构买比赋值:机买/总买*0.1,LINETHICK0
机构卖比赋值:机卖/总卖*0.1,LINETHICK0
输出最新:CLOSE,LINETHICK2,画白色
AAB赋值:SUM(成交额,C的有效数据周期数)/SUM(成交量*100,C的有效数据周期数)
BB赋值:BETWEEN(C/AAB,C+H,C-H)
DRAWTEXT( ISLASTBAR AND 最新>1日前的最新,最新,STRCAT(' 涨▲',CON2STR(最新,2))),画洋红色
DRAWTEXT( ISLASTBAR AND 最新<1日前的最新,最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00
输出均价11:240的C*V日累和/240的V日累和,画黄色,LINETHICK2
TT赋值:C的有效数据周期数
前高赋值:REF(TT日内H最高值,1)
突破赋值:CROSS(C,REF(TT日内H最高值,1)){ AND HHVBARS(成交量,TT)=0} AND C/均价11<1.09 AND TT>1 AND TT<240
主力扫盘赋值:统计13日满足突破的天数>=3 AND CROSS(C,REF(TT日内H最高值,1)){ AND HHVBARS(成交量,TT)=0}
当满足条件主力扫盘时,在前高和 '←扫盘'位置书写文字
已主力扫盘赋值:上次主力扫盘距今天数<13
DRAWTEXT(上次主力扫盘距今天数<8,(DYNAINFO(3))*9.5/10 , '↖已扫'),画绿色
全仓买进赋值:CROSS(C,REF(TT日内H最高值,1)) AND HHVBARS(成交量,TT)=0 AND C/均价11<1.09 AND TT>1 AND TT<240 AND 上次主力扫盘距今天数>=21
当满足条件全仓买进 时,在前高和 '←全仓'位置书写文字
VAR1赋值:C的13日指数移动平均,13)
控盘赋值:(VAR1-1日前的VAR1)/1日前的VAR1*1000
JJJ赋值:DYNAINFO(11)
P赋值:55
S赋值:8
M1赋值:3
能量赋值:(C的S日指数移动平均-C的P日指数移动平均)*10
空头赋值:能量的M1日指数移动平均
BTJ11赋值:(C-JJJ)/JJJ<-0.03
BTJ2赋值:控盘>1日前的控盘 AND 控盘<-0.2
BTJ3赋值:能量上穿空头 AND 能量<-0.3
BTJ811赋值:BTJ11 AND BTJ2 AND BTJ3的13过滤
有庄赋值:BTJ811
RSV:=(CLOSE-6日内最低价最低值)/(6日内最高价最高值-6日内最低价最低值)*80
RSV的2日[1日权重]移动平均
K的2日[1日权重]移动平均
RS赋值:(CLOSE-9日内最低价最低值)/(9日内最高价最高值-9日内最低价最低值)*80
K1:=RS>=75
K2:=RS<80
HJ_2赋值:DYNAINFO(4)>0 AND 2日内最高价最高值/2日内最低价最低值<1.25 AND 1日前的CLOSE<3日内最低价最低值+(3日内最高价最高值-3日内最低价最低值)*0.85
HJ_9赋值:CLOSE的2日指数移动平均
HJ_10赋值:CLOSE的3日指数移动平均
HJ_11赋值:HJ_9和HJ_10较大值
X2赋值:CLOSE>HJ_11 AND HJ_2 AND (CLOSE>REF(2日内最高价最高值,1) AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)>0.015)
当满足条件X2时,在C*0.999和'←准备注意买进'位置书写文字
{牛熊线}
NX赋值:MA(((SLOPE(C,20)*5)+C),10)
{中枢}
B1赋值:HOUR=09 AND MINUTE=45
B20赋值:15日内L最低值
B30赋值:上次B1距今天数
B4赋值:B30日前的B20
输出B5:CONST(B4),COLORFF80FF,CIRCLEDOT,LINETHICK2
当满足条件CURRBARSCOUNT=20时,在B4和'分时支撑'位置书写文字
C1赋值:HOUR=09 AND MINUTE=45
C2赋值:15日内H最高值
C3赋值:上次C1距今天数
C4赋值:C3日前的C2
输出C5:CONST(C4),COLORFF80FF,CIRCLEDOT,LINETHICK2
当满足条件CURRBARSCOUNT=20时,在C4和'分时突破'位置书写文字
{DRAWBAND(C5,RGB(204,204,204),B5,RGB(204,204,204))
}
{MAC4734198244399026730}
DIF:=CLOSE的12日指数移动平均-CLOSE的26日指数移动平均
DEA:=DIF的9日指数移动平均
MAC473419824439902673010:=(DIF-DEA)*2
AA0赋值:MAC473419824439902673010>00 AND DIF>0 AND DEA>0
{捉牛信号}
A100赋值:HOUR=10 AND MINUTE=0
A20赋值:30日内H最高值
A30赋值:上次A100距今天数
A40赋值:A30日前的A20
A50赋值:CONST(A40)
A80赋值:CLOSE>A50 AND 1日前的C<=A50 AND CLOSE>NX
AB赋值:A80的100过滤
A90赋值:DYNAINFO(3)
AC赋值:CLOSE<=A90*1.04 AND CLOSE>A90
量比赋值:V/REF(V的5日简单移动平均,1)
XG赋值:AA0 AND AB AND AC AND A40>A90 AND 量比>=1
当满足条件XG时,在A50和23之间画图标
当满足条件CURRBARSCOUNT=20时,在A4和'强势区域'位置书写文字
D1:=HOUR=10 AND MINUTE=0
D2:=30日内L最低值
D3:=上次D1距今天数
D4:=D3日前的D2
D5:CONST(D4),COLOR808080,CIRCLEDOT,LINETHICK2
当满足条件CURRBARSCOUNT=20时,在D4和'底部区域'位置书写文字
}
{均线突破中枢}
JJ1:=DAY!=1日前的DAY
JJ2赋值:上次V>0 AND JJ1距今天数+1
JJ赋值:JJ2的V*C日累和/JJ2的V日累和
XG2:=JJ上穿C5
当满足条件XG2时,在JJ和23之间画图标
{TS赋值:(B4+C4)/2
当满足条件XG2时,在TS和'回落靠近黄线买'位置书写文字
}
VARA3赋值:90日内CLOSE最高值
VARA4赋值:90日内CLOSE最低值
VARA5赋值:VARA3 - VARA4
VARA6赋值:EMA((CLOSE - VARA4)/VARA5 - 0.5,14)
ZLSP赋值:VARA6*20
VARA7赋值:REF(66日内CLOSE最高值,2)
VARA8赋值:CLOSE上穿VARA7 AND (110日内CLOSE最高值/110日内CLOSE最低值 - 1) * 100 < 45 AND ZLSP < 5.666
VARA11赋值:15* VARA8的41过滤
XG0:480日内H最高值,DOTLINE,画青色
DRAWTEXT(FILTER(CROSS(C,1日前的XG),10) AND C>1日前的XG,C*0.995,'突'),画黄色
RQ赋值:DATETODAY(DATE)-DATETODAY(TOTALBARSCOUNT-CURRBARSCOUNT日前的DATE)+1
JY赋值:上次(RQ-1日前的RQ距今天数!=WEEKDAY-1日前的WEEKDAY OR TOTALBARSCOUNT-CURRBARSCOUNT=0)+1
MA1赋值:JY日前的C
MA2赋值:JY日前的MA1
MA3赋值:JY日前的MA2
MA4赋值:JY日前的MA3
MA5赋值:JY日前的MA4
MA6赋值:JY日前的MA5
MA7赋值:JY日前的MA6
MA8赋值:JY日前的MA7
MA9赋值:JY日前的MA8
H1赋值:MAX(DYNAINFO(3),DYNAINFO(5))
L1赋值:MIN(DYNAINFO(3),DYNAINFO(6))
P1:=H1-L1
输出阻力:L1+P1*8/9,COLORLIRED,DOTLINE
输出支撑:L1+P1*0.5/9,画绿色,DOTLINE
输出均线:IF(BETWEEN(C/(0的成交额日累和/0的成交量*100日累和),1.05,0.95)=0,C的0日简单移动平均,(0的成交额日累和/0的成交量*100日累和)),画黄色,DOTLINE
DIFF:=(CLOSE的12日指数移动平均-CLOSE的26日指数移动平均)+DYNAINFO(3)
DEAA:=DIFF的9日指数移动平均