通达信一浪副图指标公式 波段启动加速结束 可以综合选股用 源码 附图
E10:=EXPMA(C,10);
ZT:=C/REF(C,1)>1.095 AND C=H;
A:=BARSLASTCOUNT(ZT);
T:=BARSLAST(CROSS(A=3,0.5));
LL:=REF(L,(T+2));
TJ:=C<LL;
AA:=COUNT(TJ,T+1)=1 AND TJ;
TA:=BARSLAST(AA);
LT:=BARSLAST(L=LLV(L,TA+1));
TJ1:=CROSS(C,E10);
XG:COUNT(TJ1,LT+1)=1 AND TJ1 AND TOTALBARSCOUNT>200;
BB2:=IF(C>REF((6*H+5*REF(H,1)+4*REF(H,2)+3*REF(H,3)+2*REF(H,4)+1*REF(H,5))/(6+5+4+3+2+1),1),1,IF(C<REF((6*L+5*REF(L,1)+4*REF(L,2)+3*REF(L,3)+2*REF(L,4)+1*REF(L,5))/(6+5+4+3+2+1),1),-1,0));
DD2:=BARSLAST(NOT(BB2=0));
B:=IF(BB2=0,REF(BB2,DD2),BB2);
VAR1:=EMA(EMA(CLOSE,13),13);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
JJ:=DYNAINFO(11);
P:=55;S:=8;M1:=3;
财:=(EMA(CLOSE,S)-EMA(CLOSE,P))*10,COLORRED,LINETHICK1;
神:=EMA(财,M1),COLORGREEN,LINETHICK1;
BTJ1:=(C-JJ)/JJ<-0.03;
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ12:=LAST(JJ>=REF(JJ,1),5,1) AND (C-JJ)/JJ<0.005;
STJ1:=(C-JJ)/JJ>0.005;
{控盘买卖条件}
STJ01:=控盘<REF(控盘,1) AND 控盘>0.5;
STJ02:=控盘>0;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ22:=控盘>REF(控盘,1) AND 控盘<0 ;
{波段买卖条件}
BTJ3:=CROSS(财,神) AND 财<-0.3;
BTJ32:=CROSS(财,神) AND 财<-0.1;
STJ31:=CROSS(神,财);
STJ32:=CROSS(神,财) AND 财>1.618;
BTJ81:=FILTER(BTJ1 AND BTJ2 AND BTJ3,13);
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
BTJ82:=FILTER(BTJ12 AND BTJ22 AND BTJ32,13);
STJ81:=FILTER(STJ1 AND STJ01 AND STJ31,13);
STJ82:=FILTER(STJ02 AND STJ32 ,13);
STJ83:=STJ81 AND STJ82;
庄:= BTJ11 AND BTJ2 AND BTJ3;
有庄:=FILTER(庄,55);
BU:=BTJ81+BTJ811+有庄>=2 AND CROSS(IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1),0);
启动:BU,NODRAW,COLORRED;
止损:C<REF(O,BARSLAST(BU>0)) AND COUNT(C<REF(O,BARSLAST(BU>0)),BARSLAST(BU>0))=1 AND IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)>0,NODRAW, COLORGREEN;
加速:(H/REF(C,BARSLAST(BU>0))>=1.05 OR C/REF(C,BARSLAST(BU>0))>=1.05) AND COUNT(止损,BARSLAST(BU>0))=0 AND COUNT(CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)),BARSLAST(BU>0))=0,NODRAW, COLORMAGENTA;
区间:COUNT(BU,BARSLAST(BU)+1)=1 AND COUNT(止损,BARSLAST(BU>0)+1)=0 AND COUNT(CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)), BARSLAST(BU>0)+1)=0,NODRAW,COLOR696960;
结束:(COUNT(BU,BARSLAST(BU)+1)=1 AND COUNT(止损,BARSLAST(BU>0)+1)=0 AND COUNT(CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1)), BARSLAST(BU>0)+1)=1 AND CROSS(0,IF(MA(CLOSE,1)>IF(B=-1,MA(HIGH,6),MA(LOW,6)) ,1,-1))) OR 止损,NODRAW, COLORGREEN;
STICKLINE(区间>0,0,1,4,0),COLOR696960;
STICKLINE(启动>0,0,1,4,0),COLORRED;
STICKLINE(加速>0 ,0.3,0.6,4,0),COLORMAGENTA;
STICKLINE(结束>0,0,1,4,0),COLORGREEN;
TS:=BARSLASTCOUNT(加速>0);
DRAWTEXT(加速>0,0.5,VAR2STR(TS,0));
未来函数检测结果如下:
该公式包含未来函数:DYNAINFO
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
E10赋值:C的10日指数移动平均
ZT赋值:C/1日前的C>1.095 AND C=H
A赋值:BARSLASTCOUNT(ZT)
T赋值:上次A=3上穿0.5距今天数
LL赋值:REF(L,(T+2))
TJ:=C
AA赋值:统计T+1日满足TJ的天数=1 AND TJ
TA赋值:上次AA距今天数
LT赋值:上次L=TA+1日内L最低值距今天数
TJ1:=C上穿E10
输出XG:统计LT+1日满足TJ1的天数=1 AND TJ1 AND TOTALBARSCOUNT>200
BB2赋值:IF(C>REF((6*H+5*REF(H,1)+4*REF(H,2)+3*REF(H,3)+2*REF(H,4)+1*REF(H,5))/(6+5+4+3+2+1),1),1,IF(C[
DD2赋值:上次NOT(BB2=0距今天数)]
B赋值:IF(BB2=0,DD2日前的BB2,BB2)
VAR1:=CLOSE的13日指数移动平均,13)
控盘赋值:(VAR1-1日前的VAR1)/1日前的VAR1*1000
JJ赋值:DYNAINFO(11)
P赋值:55
S赋值:8
M1赋值:3
财赋值:(CLOSE的S日指数移动平均-CLOSE的P日指数移动平均)*10,画红色,LINETHICK1
神赋值:财的M1日指数移动平均,画绿色,LINETHICK1
BTJ1:=(C-JJ)/JJ<-0.03
BTJ11:=(C-JJ)/JJ<-0.03
BTJ12:=LAST(JJ>=1日前的JJ,5,1) AND (C-JJ)/JJ<0.005
STJ1:=(C-JJ)/JJ>0.005
{控盘买卖条件}
STJ01:=控盘<1日前的控盘 AND 控盘>0.5
STJ02:=控盘>0
BTJ2:=控盘>1日前的控盘 AND 控盘<-0.2
BTJ22:=控盘>1日前的控盘 AND 控盘<0
{波段买卖条件}
BTJ3:=财上穿神 AND 财<-0.3
BTJ32:=财上穿神 AND 财<-0.1
STJ31:=神上穿财
STJ32:=神上穿财 AND 财>1.618
BTJ81:=BTJ1 AND BTJ2 AND BTJ3的13过滤
BTJ811:=BTJ11 AND BTJ2 AND BTJ3的13过滤
BTJ82:=BTJ12 AND BTJ22 AND BTJ32的13过滤
STJ81:=STJ1 AND STJ01 AND STJ31的13过滤
STJ82:=STJ02 AND STJ32 的13过滤
STJ83:=STJ81 AND STJ82
庄赋值: BTJ11 AND BTJ2 AND BTJ3
有庄赋值:庄的55过滤
BU:=BTJ81+BTJ811+有庄>=2 AND CROSS(IF(CLOSE的1日简单移动平均>IF(B=-1,最高价的6日简单移动平均,最低价的6日简单移动平均) ,1,-1),0)
输出启动:BU,NODRAW,画红色
输出止损:C[0距今天数) AND COUNT(C][0距今天数),上次BU>0距今天数)=1 AND IF(CLOSE的1日简单移动平均>IF(B=-1,最高价的6日简单移动平均,最低价的6日简单移动平均) ,1,-1)>0,NODRAW, 画绿色]
输出加速:(H/REF(C,上次BU>0距今天数)>=1.05 OR C/REF(C,上次BU>0距今天数)>=1.05) AND COUNT(止损,上次BU>0距今天数)=0 AND COUNT(CROSS(0,IF(CLOSE的1日简单移动平均>IF(B=-1,最高价的6日简单移动平均,最低价的6日简单移动平均) ,1,-1)),上次BU>0距今天数)=0,NODRAW, COLORMAGENTA
输出区间:COUNT(BU,上次BU距今天数+1)=1 AND COUNT(止损,BARSLAST(BU>0)+1)=0 AND COUNT(CROSS(0,IF(CLOSE的1日简单移动平均>IF(B=-1,最高价的6日简单移动平均,最低价的6日简单移动平均) ,1,-1)), BARSLAST(BU>0)+1)=0,NODRAW,COLOR696960
输出结束:(COUNT(BU,上次BU距今天数+1)=1 AND COUNT(止损,BARSLAST(BU>0)+1)=0 AND COUNT(CROSS(0,IF(CLOSE的1日简单移动平均>IF(B=-1,最高价的6日简单移动平均,最低价的6日简单移动平均) ,1,-1)), BARSLAST(BU>0)+1)=1 AND CROSS(0,IF(CLOSE的1日简单移动平均>IF(B=-1,最高价的6日简单移动平均,最低价的6日简单移动平均) ,1,-1))) OR 止损,NODRAW, 画绿色
当满足条件区间>0时,在0和1之间画柱状线
当满足条件启动>0时,在0和1之间画柱状线
当满足条件加速>0 时,在0.3和0.6之间画柱状线
当满足条件结束>0时,在0和1之间画柱状线
TS赋值:BARSLASTCOUNT(加速>0)
DRAWTEXT(加速>0,0.5,VAR2STR(TS,0))