相关简介:通达信分时t0精准买卖指标公式源码分享
通达信指标公式源码概况:
指标类别:通达信指标公式
授权方式:免费版
指标评级:★★★★★
指标分类:策略
画线方法:副图
很多股友喜欢用KDJ,但是并不太会用,所以今天分享出来的指标是根据KDJ改编,今年来此指标也一直帮我抄过几次底,也避开了几次顶,也算是我的幸运指标了。基本上出手必有收获,成功率极高。
源码不同,原理相同。这个指标看趋势是非常好,要抓最佳买点,还是需要结合其他指标配合使用。不然买在横盘整理期,就是漫长的等待,资金躺着睡觉。
通达信指标公式源码:
AF1:=1;
TT:=BARSLAST(HOUR=9ANDMINUTE=(30+AF1))+1;
均价:=SUM(AMOUNT,0)/SUM(VOL,0)/100;
IFHOUR>9ANDRANGE(HHV(C,60)/LLV(C,60),1,1.02)THEN盘整:=C;
V1:=V;
HH:=C>REF(C,1)ANDC/均价>(1+0.03);
LL:=C<REF(C,1)ANDC/均价<(1-0.03);
HH1:=CROSS(SUM(HH,0),0.5);
LL1:=CROSS(SUM(LL,0),0.5);
SS1:=SUM(HH1,0)*CROSS(COUNT(C<REF(C,1),BARSLAST(HH1)),0.5);
BB1:=SUM(LL1,0)*CROSS(COUNT(C>REF(C,1),BARSLAST(LL1)),0.5);
X1:BARSLAST(SS1),LINETHICK0,HIDEVAL;
顶1:REF(C,X1+1),LINETHICK0,COLORGREEN;
Y1:BARSLAST(BB1),LINETHICK0,HIDEVAL;
底1:REF(C,Y1+1),LINETHICK0,COLORRED;
DRAWLINE(SS1,顶1,X1=1,顶1,11),COLORGREEN,LINETHICK2;
DRAWLINE(BB1,底1,Y1=1,底1,11),COLORRED,LINETHICK2;
HH2:=CROSS(SUM(HHANDC>顶1*1.03,0),0.5);
LL2:=CROSS(SUM(LLANDC<底1*0.97,0),0.5);
SS2:=SUM(HH2,0)*CROSS(COUNT(C<REF(C,1),BARSLAST(HH2)),0.5);
BB2:=SUM(LL2,0)*CROSS(COUNT(C>REF(C,1),BARSLAST(LL2)),0.5);
X3:BARSLAST(SS2),LINETHICK0,HIDEVAL;
顶2:REF(C,X3+1),LINETHICK0,COLORGREEN;
Y3:BARSLAST(BB2),LINETHICK0,HIDEVAL;
底2:REF(C,Y3+1),LINETHICK0,COLORRED;
DRAWLINE(SS2,顶2,X3=1,顶2,11),COLORGREEN,LINETHICK1;
DRAWLINE(BB2,底2,Y3=1,底2,11),COLORRED,LINETHICK1;
DRAWICON(HH1ORHH2,C*1.01,13);
DRAWICON(LL1ORLL2,C*0.99,12);
DRAWICON(BB1ORBB2,REF(C,1)*0.99,7);
DRAWICON(SS1ORSS2,REF(C,1)*1.01,8);
V1:=(C*2+H+L)/4*10;
V2:=EMA(V1,13)-EMA(V1,34);
V3:=EMA(V2,5);V4:=2*(V2-V3)*5.5;
主力撤:IF(V4<=0,V4,0),colorgreen;
主力进:IF(V4>=0,V4,0);
V5:=(HHV(INDEXH,8)-INDEXC)/(HHV(INDEXH,8)-LLV(INDEXL,8))*8;
V6:=EMA(3*V5-2*SMA(V5,18,1),5);
V7:=(INDEXC-LLV(INDEXL,8))/(HHV(INDEXH,8)-LLV(INDEXL,8))*10;
V8:=(INDEXC*2+INDEXH+INDEXL)/4;
V9:=EMA(V8,13)-EMA(V8,34);
VA:=EMA(V9,3);
VB:=(V9-VA)/2;
大盘资金进场:
IF(VB>=0,VB,0),Coloryellow;
大盘资金撤走:
IF(VB<=0,VB,0),colorblue;
V11:=3*SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1)-2*SMA(SMA((C-LLV(L,55))/(HHV(H,55)-LLV(L,55))*100,5,1),3,1);
趋势线:EMA(V11,3);
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
准备现金:STICKLINE(趋势线<=13,0,20,5,0),colorcc9900;
aa:=(趋势线<=13)andfilter((趋势线<=13),15);
drawtext(aa,30,’准备现金’),colorcc9900;
买入股票:STICKLINE(趋势线<=13ANDV12>13,0,50,5,0),color0099ff;
bb:=(趋势线<=13ANDV12>13)andfilter((趋势线<=13ANDV12>13),10);
drawtext(bb,60,’买入股票’),color0099ff;
见顶清仓:STICKLINE(趋势线>=90ANDV12,0,30,5,0),colorgray;
cc:=(趋势线>=90ANDV12)andfilter((趋势线>=90ANDV12),10);
drawtext(cc,40,’见顶清仓’),colorgray;
[源码注释]通达信公式动态翻译结果
A赋值:KDJ的K
A1赋值:KDJ的D
A2赋值:上次A上穿A1ANDA1<30距今天数
A3赋值:A上穿A1AND A1<60 AND A1>30
输出XG:A3 AND A2>5 AND A2<60
评论(0)