股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 拆分三分钟量的主 副图 源码,附图)


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-9 14:13:21
拆分三分钟量的主 副图 源码,附图)介绍

拆分三分钟量的主 副图 源码,附图)

[1]发一个通过拆分三分钟量的主图,副图,用这个公式可以及时发掘那些突然发力的股票【甚至要涨停的也躲过不了这一关】,还可以用于分时预警,也可以排序(分时),这个公式里的问题你们自己处理 不必再问我,【05引】大家都有不另发了,

---------------------------------------------------------------------------------
{3分钟主图}
tt:=BARSCOUNT(C);
CC:CLOSE,COLOR00ffFF,linethick2;
zz:=SUM(AMOUNT,tt)/SUM(VOL*100,tt);
zz1:=BETWEEN(C/zz,1.05,0.95);
均线:IF(zz1=0,MA(C,TT),zz),COLOR00ff00,linethick2;
a:=if(c>=均线,1,0);
均线上:=COUNT(a=1 ,0 );
均线下:=COUNT(a=0 ,0 );
均线上占:均线上/(均线上+均线下)*100,PRECIS1,linethick0;
{叠加股票}
TC:=STRCMP(STRLEFT(MARKETLABEL,2),'SZ');
DPSH:="SH000001$CLOSE"/HHV(STKINDI('SH000001','05引.RC#DAY'),0);
DPSZ:="399901$CLOSE"/HHV(STKINDI('399901','05引.RC#DAY'),0);
DPC:=IF(INBLOCK('A股板块'),DYNAINFO(3)*IF(TC=0,DPSZ,DPSH),C);
POLYLINE(C>0,DPC),COLOR0000FF,LAYER0,linethick2;


外内盘:DYNAINFO(23)/DYNAINFO(22),PRECIS1,linethick0;
DRAWTEXTABS( 5,5,'外盘比内盘◢>1.0◣: '+NUMTOSTRN(DYNAINFO(23)/DYNAINFO(22),2)+''),COLOR99FF99,LINETHICK2;
DRAWTEXTABS( 5,20,'[分时]量比◢>1.0◣: '+NUMTOSTRN(DYNAINFO(17),2)+', [日].量比:'+NUMTOSTRN(SUM(V,0)/("VOL.MA1#DAY"),2)+' '),COLOR0000FF,LINETHICK2;
比:SUM(V,0)/SUM("05引.RMV#DAY"/240,0)*100,PRECIS1,linethick0;
分钟量3:SUM(V,3)/SUM("05引.RMV#DAY"/240,3)*100,COLOR00FF00,PRECIS1,linethick0;

量比:DYNAINFO(17),PRECIS1,linethick0;
DRAWTEXTABS( 5,35,'现量'+NUMTOSTRN(SUM(V,0)/10000,2)+'万手: 与昨天(5天均量)同期量'+NUMTOSTRN(SUM("05引.RMV#DAY"/240,0)/10000,2)+'万手: 比:= '+NUMTOSTRN(比,1)+'%'),COLOR77FF00,LINETHICK3;
DRAWTEXTABS( 5,50,'3分钟量与昨天(5天均量)同期量:比:= '+NUMTOSTRN(SUM(V,3)/SUM("05引.RMV#DAY"/240,3)*100,1)+'%'),COLOR77FF00,LINETHICK3;
DRAWTEXTABS( 5,70,'5分钟量与昨天(5天均量)同期量:比:= '+NUMTOSTRN(SUM(V,5)/SUM("05引.RMV#DAY"/240,5)*100,1)+'%'),COLOR77FFFF,LINETHICK3;
DRAWTEXTABS( 5,90,'15分钟量与昨天(5天均量)同期量:比:= '+NUMTOSTRN(SUM(V,15)/SUM("05引.RMV#DAY"/240,15)*100,1)+'%'),COLORFF00FF,LINETHICK3;

DRAWTEXTABS(5,110,'均线上占:'+NUMTOSTRN(均线上占,1)+'%,'),Color00FFFF,LINETHICK4;

{红绿三角【副图】}
H1:hhvall(hhv(C,0)),COLOR70FF00,CROSSDOT,LINETHICK1;
L1:llvall(llv(C,0)),COLOR00FF00,CROSSDOT,LINETHICK1;
FILLRGN(L1,H1,L1<H1,RGB(0,10,0)),LINETHICK2,LAYER6;
B10304:=FILTER(H1,3);
C10304:=BACKSET(B10304,3+1);
D10304:=FILTER(C10304,3);{高点}
B20304:=FILTER(L1,3);
C20304:=BACKSET(B20304,3+1);
D20304:=FILTER(C20304,3);{低点}
E10304:=(REF(L1,1)+REF(H1,1))/2;
E20304:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H10304:=(D10304 AND NOT(D20304 AND E10304>=E20304)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
L10304:=(D20304 AND NOT(D10304 AND E10304=E20304));
X10304:=REF(BARSLAST(H10304),1)+1;
F10304:=BACKSET(H10304 AND COUNT(L10304,X10304)>0,LLVBARS(IF(L10304,LOW,10000),X10304));
G10304:=F10304>REF(F10304,1);
I10304:=BACKSET(G10304,2);
LD0304:=I10304>REF(I10304,1);{过滤后低点}
L20304:=LD0304 OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X20304:=REF(BARSLAST(L20304),1)+1;
F20304:=BACKSET(L20304 AND COUNT(H10304,X20304)>0,HHVBARS(IF(H10304,HIGH,0),X20304));
G20304:=F20304>REF(F20304,1);
I20304:=BACKSET(G20304,2);
HD0304:=I20304>REF(I20304,1);{过滤后高点}
UU0304:=BACKSET(BARSTATUS=2,BARSLAST(LD0304)+1);
VV0304:=UU0304>REF(UU0304,1);
UU20304:=BACKSET(BARSTATUS=2,BARSLAST(HD0304)+1);
VV20304:=UU20304>REF(UU20304,1);

{以下语句为三角形部分}
底:REF(L,BARSLAST(VV0304)),COLORred,LINETHICK2;
顶:REF(H,BARSLAST(VV20304)),COLORGreen,LINETHICK2;
{下跌三角形:绿色三角形画完介入}
StickLine(VV0304,顶,底,0,0),COLOR00FF00,linethick3;
DRAWLINE(VV20304,H,VV0304,L,0),COLOR00FF00,linethick3;{斜}
DRAWLINE(VV20304,H,VV0304,顶,0),COLOR00FF00,linethick3;
{上涨三角形:红色三角形画完出局}
StickLine(VV20304 ,顶,底,0,0),COLOR0000FF,linethick3;
DRAWLINE(VV0304,L,VV20304,H,0),COLOR0000FF,linethick3;{斜}
DRAWLINE(VV0304,L,VV20304,底,0),COLOR0000FF,linethick3;

NN304:= DISPSTATUS=2;
DRAWTEXT(nn304,底,'底: '+NUMTOSTRN(底,2)+'元 '),ALIGN0,COLORred,LINETHICK1,VALIGN2;
DRAWTEXT(nn304,顶,'顶: '+NUMTOSTRN(顶,2)+'元 '),ALIGN0,COLORGreen,LINETHICK1,VALIGN2;
REF((顶+底)/2,BARSLAST(VV20304) OR (VV0304)),COLORFF9900,LINETHICK2,VALIGN2;
REF(底+(顶-底)*0.618,BARSLAST(VV20304) OR (VV0304)),COLOR00FFFF,DOTLINE,VALIGN2;
REF(底+(顶-底)*0.382,BARSLAST(VV20304) OR (VV0304)),COLOR00FFFF,DOTLINE,VALIGN2;
DRAWTEXT(nn304,(顶+底)/2, '50%: '+NUMTOSTRN((顶+底)/2,2)+'元 '),ALIGN0,COLORFF9900,LINETHICK1,VALIGN2;
DRAWTEXT(nn304,顶, ''+NUMTOSTRN((顶-C)/C*100,2)+'% '),ALIGN2,COLOR00FFFF,LINETHICK1,VALIGN2;
DRAWTEXT(nn304,底, ''+NUMTOSTRN((C-底)/底*100,2)+'% '),ALIGN2,COLOR00FFFF,LINETHICK1,VALIGN2;
FILLRGN(顶,(顶+底)/2,顶>(顶+底)/2,RGB(0,0,255)),COLORFF9900,LINETHICK2,LAYER5;
FILLRGN((顶+底)/2,底,(顶+底)/2>底,RGB(60,0,60)),COLOR00FF00,LINETHICK2,LAYER5;
-----------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
{3分钟量副图}
DRAWRECTREL(-1,0,1000,1000,RGB(40,0,40)),color0077FF,LINETHICK2,LAYER7;
分钟量3:ema(SUM(V,3)/SUM("05引.RMV#DAY"/240,3)*100,5),COLOR00FF00,PRECIS1,linethick1;
PARTLINE(分钟量3,(分钟量3>REF(分钟量3,1))-1,rgb(0,255,0),1,rgb(255,0,0) ),LINETHICK2,LAYER0;

DRAWTEXTABS( 5,5,'3分钟量与昨天(5天均量)同期量:比:= '+NUMTOSTRN(SUM(V,3)/SUM("05引.RMV#DAY"/240,3)*100,1)+'%'),COLOR77FF00,LINETHICK3;
X:=BARSLAST(DISPSTATUS=1);
HX:=HHVALL(HHV(分钟量3,X));
VERTLINE(分钟量3=HX and 分钟量3>600,2),LAYER0,COLOR0077FF;

比:SUM(V,0)/SUM("05引.RV#DAY"/240,0)*100,PRECIS1,linethick0;
DRAWTEXTABS( 5,25,' 现量'+NUMTOSTRN(SUM(V,0)/10000,2)+'万手: 与昨天同期量比:= '+NUMTOSTRN(比,1)+'%'),COLOR77FFff,LINETHICK3;

分钟量5:SUM(V,5)/SUM("05引.RV#DAY"/240,5)*100,COLORFF9900,PRECIS1,linethick1;

T:=BARSCOUNT(C);
TP:= FILTER( C>=HHV(H,T) AND V>MA(V,0)*2 AND DYNAINFO(17)>1 AND TIME0>39600 ,240) ;
VERTLINE(TP,1),COLOR00ffff;
 


 




 



gd18531

回复

举报

QQ|

GMT+8, 2024-11-20 07:28

快速回复 返回顶部 返回列表