通达信量王资金及超大中小对副图指标 看穿主力资金进出 源码 附图
{量王资金副图源码如下}
N:=100;
M1:=5;
M2:=10;
{量王}
H_L:=0.1*CONST(HHV(AMOUNT,240));
V100:= V<=LLV(V,N)*1.2 AND V>0 AND BARSCOUNT(V)>=N;
百日地量:COUNT(V100,5)>=3;
DRAWTEXT(FILTER(百日地量,4),AMOUNT+2*H_L,'地量'),COLORGRAY;
总量:AMOUNT,VOLSTICK;
MAVOL1:=MA(总量,M1);
MAVOL2:=MA(总量,M2);
去除次新股:=BARSCOUNT(C)>=15;{次新股的天数}
ZTB:=C>INTPART(REF(C,1)*(1+10/100)/0.01+0.5)*0.01-0.006 AND C=H;
STICKLINE(AMOUNT>800000000 AND ZTB,0,AMOUNT,-1,0),COLORRED;
STICKLINE(AMOUNT>1000000000 AND ZTB,0,AMOUNT,-1,0),COLORMAGENTA;
启动:=MA(总量,250),DOTLINE,LINETHICK1,COLORWHITE;
量比:V/REF(MA(V,5),1),COLORBROWN,NODRAW;
几倍:=1.9;
倍量: 总量 >=REF(总量,1)*几倍 AND (IF(C<O,C>REF(C,1),1)),COLORYELLOW,NODRAW;
倍缩: REF(总量,1)>= 总量 *几倍,COLORMAGENTA,NODRAW;
百低:总量=LLV(总量,125) AND BARSCOUNT(总量)>=125,COLORBLUE,NODRAW;
平量: RANGE(总量 /REF(总量,1),0.97,1.03) AND BARSCOUNT(总量)>=2,COLORWHITE,NODRAW;
天量:总量=HHV(总量,120), COLORRED;
量王:天量&&倍量&&量比>2&&(BARSCOUNT(C)+1)>120,COLORGREEN, NODRAW;
倍数:总量/REF(总量,1),COLORYELLOW,NODRAW;
量王后:REF(量王,1) AND V>REF(V,1),COLORMAGENTA;
STICKLINE(量王后,0,总量*0.88,2,0),COLORMAGENTA;
V1:=总量 *0.9;
V2:= 总量 *0.8;
STICKLINE(倍量, 0,V1,1,0),COLORYELLOW;
STICKLINE(倍缩, 0,V1,0.1,0),COLORMAGENTA;
STICKLINE(百低, 0,V1,1,0),COLORBLUE;
STICKLINE(天量,0,V1,0.1,0),COLORRED;
STICKLINE(量王&&COUNT(量王,2)<=1,0,AMOUNT,-1,0),COLORGREEN;
STICKLINE(C<O AND C>REF(C,1),0, 总量,0,0),COLORRED;{假阴柱}
STICKLINE((量王 AND 总量),总量/3,总量/3,2,0)COLORRED LINETHICK9;
STICKLINE((量王 AND 总量),总量*2/3,总量*2/3,2,0)COLORRED LINETHICK9;
STICKLINE((量王 AND 总量),总量*1/2,总量*1/2,2,0)COLORRED LINETHICK9;
LX1:=BARSLAST(量王>0);
NOTEXT8:IF(CURRBARSCOUNT<=CONST(LX1)+1,CONST(REF(总量,LX1)),DRAWNULL),COLORGREEN LINETHICK1;
天量王:总量=HHV(总量,500),COLORRED;
{DRAWLINE(天量王,H,REF(天量王,1),REF(H,1),1),COLORYELLOW,DOTLINE,LINETHICK2;}
LX3:=BARSLAST(天量王>=1);
NOTEXT10:IF(CURRBARSCOUNT<=CONST(LX3)+1,CONST(REF(总量,LX3)),DRAWNULL),COLORYELLOW, LINETHICK2;
STICKLINE((天量王 AND 总量),总量,总量*0.9,3,0),COLORYELLOW ;
梯量:=EVERY(C>O,3) AND EVERY(C>REF(C,1),2) AND EVERY(V>REF(V,1),2){ AND SUM(涨幅,3)<15};
梯量王:梯量 AND 总量>NOTEXT8 AND 天量 AND 量比>1.618 AND (BARSCOUNT(C)+1)>120;
LX2:=BARSLAST(梯量王>=1);
DRAWLINE(梯量王,H,REF(梯量王,1),REF(H,1),1),COLORLIRED,DOTLINE;
DRAWLINE(梯量王,L,REF(梯量王,1),REF(L,1),1),COLORLICYAN,DOTLINE;
梯量王后:=LX2=1 AND V>REF(V,1),COLORMAGENTA;
DRAWLINE(梯量王后,H,REF(梯量王后,1),REF(H,1),1),COLORRED,DOTLINE;
梯量太后:=LX2=2 AND V>REF(V,2),COLORMAGENTA;
DRAWLINE(梯量太后,H,REF(梯量太后,1),REF(H,1),1),COLORRED,LINETHICK1;
DRAWLINE(梯量太后,L,REF(梯量太后,1),REF(L,1),1),COLORCYAN;
{通达信资金}
DRAWRECTREL(0,250,200,999.4,IF(120,RGB(10,0,0),0));
超B:=L2_AMO(0,2)/10000.0;
大B:=L2_AMO(1,2)/10000.0;
中B:=L2_AMO(2,2)/10000.0;
小B:=L2_AMO(3,2)/10000.0;
超S:=L2_AMO(0,3)/10000.0;
大S:=L2_AMO(1,3)/10000.0;
中S:=L2_AMO(2,3)/10000.0;
小S:=L2_AMO(3,3)/10000.0;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW;
超大单:=(超B)-(超S),NODRAW;
大单:=(大B)-(大S),NODRAW;
中单:=(中B)-(中S),NODRAW;
小单:=(小B)-(小S),NODRAW;
DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;
DRAWRECTREL(0,CONST(830-(ABS(净流入)*500/DAZHI)),30,935,IF(CONST(净流入)>0,RGB(255,0,0{255,255,255}),RGB(23,125,255)));
DRAWRECTREL(40,CONST(830-(ABS(超大单)*500/DAZHI)),70,935,IF(CONST(超大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(80,CONST(830-(ABS(大单)*500/DAZHI)),110,935,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(120,CONST(830-(ABS(中单)*500/DAZHI)),150,935,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(160,CONST(830-(ABS(小单)*500/DAZHI)),190,935,IF(CONST(小单)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.002,0.98,0,'净流'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.040,0.98,0,'超大'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.080,0.98,0,'大单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.120,0.98,0,'中单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.160,0.98,0,'小单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.05,0.25,0,'资金搏弈 (万元)'),COLORYELLOW;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.002,0.55,0,INTPART(净流入)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.040,0.55,0,INTPART(超大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.080,0.555,0,INTPART(大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.120,0.550,0,INTPART(中单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.160,0.55,0,INTPART(小单)),COLORWHITE;
{资金三(超大中小分类)对手盘超大中小对M2副图源码如下}
超B:=L2_AMO(0,0)/10000.0;
大B:=L2_AMO(1,0)/10000.0;
中B:=L2_AMO(2,0)/10000.0;
小B:=L2_AMO(3,0)/10000.0;
超S:=L2_AMO(0,1)/10000.0;
大S:=L2_AMO(1,1)/10000.0;
中S:=L2_AMO(2,1)/10000.0;
小S:=L2_AMO(3,1)/10000.0;
大单净量:=((超B+大B)-(超S+大S))/CAPITAL*1000,NODRAW;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW;
主力净额:(超B+大B)-(超S+大S),COLORRED,NODRAW;
超大单:超B-超S,COLORRED,NODRAW;
大单:大B-大S,COLORYELLOW,NODRAW;
中单:中B-中S,COLORBLUE,NODRAW;
小单:小B-小S,COLORGREEN,NODRAW;
{STICKLINE(主力净额>0,0,主力净额,2,0),COLORRED;
STICKLINE(主力净额<0,0,主力净额,2,0),COLORCYAN};
近3日流向:SUM(主力净额,3),NODRAW;
近5日流向:SUM(主力净额,5),NODRAW;
{柱子区域}
STICKLINE( 小单,0,小单,2,0),COLORGREEN;
STICKLINE( 超大单,0,超大单,2,0),COLORRED;
STICKLINE( 中单,0,中单,1,0),COLORBLUE;
STICKLINE( 大单,0,大单,1,0),COLORYELLOW;
{机构参与}
成交总量:=((超B+大B+中B+小B)+(超S+大S+中S+小S))/2;
机构参与:IF(超大单>0,(超B+大B)/成交总量*100,(-超S-大S)/成交总量*100),COLORRED,NODRAW;
机构参与度:=CONST(IF(1 ,机构参与,DRAWNULL)),NODRAW;
DRAWTEXT_FIX(机构参与度>=30,0.850,1-0.2,0,STRCAT('当日机构参与度%: ',CON2STR(机构参与度,2))),COLOR0000FF;
DRAWTEXT_FIX(机构参与度<30,0.850,1-0.2,0,STRCAT('当日机构参与度%: ',CON2STR(机构参与度,2))),COLORFFFF00;
动态市值:=CAPITAL*C*100/10000/10000;
超大占流通盘比%:超大单/动态市值*100/10000,COLORRED,NODRAW;
大单净量%:超大占流通盘比%,COLORMAGENTA,NODRAW;
显示数值条件:=超大占流通盘比%>=1;
DRAWTEXT(显示数值条件,超大单*0.7,VAR2STR(超大单,0)),COLORGREEN;
DRAWTEXT(显示数值条件,超大单*0.5,VAR2STR(超大占流通盘比%,2)),COLORYELLOW;
0,COLORWHITE;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
{量王资金副图源码如下}N赋值:100
M1赋值:5
M2赋值:10
{量王}H_L赋值:0.1*CONST(240日内成交额最高值)
V100赋值: V<=N日内V最低值*1.2 AND V>0 AND V的有效数据周期数>=N
输出百日地量:统计5日满足V100的天数>=3
DRAWTEXT(百日地量的4过滤,成交额+2*H_L,'地量'),COLORGRAY
输出总量:成交额,成交量STICK
MAVOL1赋值:总量的M1日简单移动平均
MAVOL2赋值:总量的M2日简单移动平均
去除次新股赋值:C的有效数据周期数>=15
{次新股的天数}ZTB赋值:C>INTPART(1日前的C*(1+10/100)/0.01+0.5)*0.01-0.006 AND C=H
当满足条件成交额>800000000 AND ZTB时,在0和成交额之间画柱状线
当满足条件成交额>1000000000 AND ZTB时,在0和成交额之间画柱状线
启动赋值:总量的250日简单移动平均,DOTLINE,LINETHICK1,画白色
输出量比:V/REF(V的5日简单移动平均,1),COLORBROWN,NODRAW
几倍赋值:1.9
输出倍量: 总量 >=1日前的总量*几倍 AND (IF(C1日前的C,1)),画黄色,NODRAW
输出倍缩: 1日前的总量>= 总量 *几倍,画洋红色,NODRAW
输出百低:总量=125日内总量最低值 AND 总量的有效数据周期数>=125, 画蓝色,NODRAW
输出平量: RANGE(总量 /1日前的总量,0.97,1.03) AND 总量的有效数据周期数>=2,画白色,NODRAW
输出天量:总量=120日内总量最高值, 画红色
输出量王:天量&&倍量&&量比>2&&(C的有效数据周期数+1)>120,画绿色, NODRAW
输出倍数:总量/1日前的总量,画黄色,NODRAW
量王后:1日前的量王 AND V>1日前的V,画洋红色
当满足条件量王后时,在0和总量*0.88之间画柱状线
V1赋值:总量 *0.9
V2赋值: 总量 *0.8
当满足条件倍量时,在 0和V1之间画柱状线
当满足条件倍缩时,在 0和V1之间画柱状线
当满足条件百低时,在 0和V1之间画柱状线
当满足条件天量时,在0和V1之间画柱状线
STICKLINE(量王&&统计2日满足量王的天数<=1,0,成交额,-1,0),画绿色
STICKLINE(C1日前的C,0, 总量,0,0),画红色
{假阴柱}STICKLINE((量王 AND 总量),总量/3,总量/3,2,0)画红色 LINETHICK9
STICKLINE((量王 AND 总量),总量*2/3,总量*2/3,2,0)画红色 LINETHICK9
STICKLINE((量王 AND 总量),总量*1/2,总量*1/2,2,0)画红色 LINETHICK9
LX1赋值:上次量王>0距今天数
输出NOTEXT8:IF( 到最后交易的周期<=CONST(LX1)+1,CONST(LX1日前的总量),DRAWNULL),画绿色 LINETHICK1
天量王:总量=500日内总量最高值,画红色
{DRAWLINE(天量王,H,1日前的天量王,1日前的H,1),画黄色,DOTLINE, 线宽为2
}LX3赋值:上次天量王>=1距今天数
输出NOTEXT10:IF( 到最后交易的周期<=CONST(LX3)+1,CONST(LX3日前的总量),DRAWNULL),画黄色, 线宽为2
STICKLINE((天量王 AND 总量),总量,总量*0.9,3,0),画黄色
梯量赋值:C>O最近3日一直存在 AND EVERY(C>1日前的C,2) AND EVERY(V>1日前的V,2){ AND 3的涨幅日累和<15}
梯输出量王:梯量 AND 总量>NOTEXT8 AND 天量 AND 量比>1.618 AND (C的有效数据周期数+1)>120
LX2赋值:上次梯量王>=1距今天数
DRAWLINE(梯量王,H,1日前的梯量王,1日前的H,1),COLORLIRED,DOTLINE
DRAWLINE(梯量王,L,1日前的梯量王,1日前的L,1),COLORLICYAN,DOTLINE
梯量王后:=LX2=1 AND V>1日前的V,画洋红色
DRAWLINE(梯量王后,H,1日前的梯量王后,1日前的H,1),画红色,DOTLINE
梯量太后:=LX2=2 AND V>2日前的V,画洋红色
DRAWLINE(梯量太后,H,1日前的梯量太后,1日前的H,1),画红色,LINETHICK1
DRAWLINE(梯量太后,L,1日前的梯量太后,1日前的L,1),画青色
{通达信资金}DRAWRECTREL(0,250,200,999.4,IF(120,RGB(10,0,0),0))
超B赋值:L2_AMO(0,2)/10000.0
大B赋值:L2_AMO(1,2)/10000.0
中B赋值:L2_AMO(2,2)/10000.0
小B赋值:L2_AMO(3,2)/10000.0
超S赋值:L2_AMO(0,3)/10000.0
大S赋值:L2_AMO(1,3)/10000.0
中S赋值:L2_AMO(2,3)/10000.0
小S赋值:L2_AMO(3,3)/10000.0
净流入赋值:(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW
超大单赋值:(超B)-(超S),NODRAW
大单赋值:(大B)-(大S),NODRAW
中单赋值:(中B)-(中S),NODRAW
小单赋值:(小B)-(小S),NODRAW
DAZHI赋值:CONST(MAX(净流入的绝对值,MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW
DRAWRECTREL(0,CONST(830-(净流入的绝对值*500/DAZHI)),30,935,IF(CONST(净流入)>0,RGB(255,0,0{255,255,255}),RGB(23,125,255)))
DRAWRECTREL(40,CONST(830-(超大单的绝对值*500/DAZHI)),70,935,IF(CONST(超大单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(80,CONST(830-(大单的绝对值*500/DAZHI)),110,935,IF(CONST(大单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(120,CONST(830-(中单的绝对值*500/DAZHI)),150,935,IF(CONST(中单)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(160,CONST(830-(小单的绝对值*500/DAZHI)),190,935,IF(CONST(小单)>0,RGB(255,0,0),RGB(23,125,255)))
当满足条件 到最后交易的周期=1时,在横轴0.002纵轴0.98位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.040纵轴0.98位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.080纵轴0.98位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.120纵轴0.98位置书写文字
当满足条件 到最后交易的周期=1时,在横轴0.160纵轴0.98位置书写文字
DRAWTEXT_FIX( 到最后交易的周期=1,0.05,0.25,0,'资金搏弈 (万元)'),画黄色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.002,0.55,0,INTPART(净流入)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.040,0.55,0,INTPART(超大单)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.080,0.555,0,INTPART(大单)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.120,0.550,0,INTPART(中单)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.160,0.55,0,INTPART(小单)),画白色
{资金三(超大中小分类)对手盘超大中小对M2副图源码如下}超B赋值:L2_AMO(0,0)/10000.0
大B赋值:L2_AMO(1,0)/10000.0
中B赋值:L2_AMO(2,0)/10000.0
小B赋值:L2_AMO(3,0)/10000.0
超S赋值:L2_AMO(0,1)/10000.0
大S赋值:L2_AMO(1,1)/10000.0
中S赋值:L2_AMO(2,1)/10000.0
小S赋值:L2_AMO(3,1)/10000.0
大单净量:=((超B+大B)-(超S+大S))/当前流通股本*1000,NODRAW
净流入赋值:(超B+大B+中B+小B)-(超S+大S+中S+小S),NODRAW
输出主力净额:(超B+大B)-(超S+大S),画红色,NODRAW
输出超大单:超B-超S,画红色,NODRAW
输出大单:大B-大S,画黄色,NODRAW
输出中单:中B-中S, 画蓝色,NODRAW
输出小单:小B-小S,画绿色,NODRAW
当满足条件主力净额>0时,在0和主力净额之间画柱状线
当满足条件主力净额<0时,在0和主力净额之间画柱状线
输出近3日流向:3的主力净额日累和,NODRAW
输出近5日流向:5的主力净额日累和,NODRAW
当满足条件 小单时,在0和小单之间画柱状线
当满足条件 超大单时,在0和超大单之间画柱状线
当满足条件 中单时,在0和中单之间画柱状线
当满足条件 大单时,在0和大单之间画柱状线
{机构参与}成交总量赋值:((超B+大B+中B+小B)+(超S+大S+中S+小S))/2
输出机构参与:IF(超大单>0,(超B+大B)/成交总量*100,(-超S-大S)/成交总量*100),画红色,NODRAW
如果1 返回机构参与否则返回DRAWNULL
DRAWTEXT_FIX(机构参与度>=30,0.850,1-0.2,0,STRCAT('当日机构参与度%: ',CON2STR(机构参与度,2))),COLOR0000FF
DRAWTEXT_FIX(机构参与度<30,0.850,1-0.2,0,STRCAT('当日机构参与度%: ',CON2STR(机构参与度,2))),COLORFFFF00
动态市值赋值:当前流通股本*C*100/10000/10000
输出超大占流通盘比%:超大单/动态市值*100/10000,画红色,NODRAW
大单净量%:超大占流通盘比%,画洋红色,NODRAW
显示数值条件赋值:超大占流通盘比%>=1
DRAWTEXT(显示数值条件,超大单*0.7,VAR2STR(超大单,0)),画绿色
DRAWTEXT(显示数值条件,超大单*0.5,VAR2STR(超大占流通盘比%,2)),画黄色
0,画白色