通达信资金成交量变化指标
预测量:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,VOL),NODRAW;
STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,预测量,0,-1,-1),COLOR00C0C0;
{成交量}
量:VOL,VOLSTICK;
{倍量}
量差:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1),NODRAW, COLORLIMAGENTA;
STICKLINE(量差>=1,0,VOL,2,0),COLORMAGENTA;
V12:=MA(V,12);
STICKLINE(VOL<MA(VOL,5)/2 AND V<V12/2,0,VOL,1,0),COLORBLUE;VOL5:MA(量,5),COLORWHITE;
VOL35:MA(量,35),COLORYELLOW;
超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;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
净流入:=(超B+大B+中B+小B)+(超S+大S+中S+小S);
大宗净流入:=(超B+大B)+(超S+大S);
超大单:=(超B)+(超S);
大单:=(大B)+(大S);
中单:=(中B)+(中S);
小单:=(小B)+(小S);
大宗进:=(超B)+(大B);
大宗出:=(超S)+(大S);
非大宗进:=(中B)+(小B);
非大宗出:=(中S)+(小S);
资金流向:=(超B+大B+中B+小B)+(超S+大S+中S+小S);
近5日流向:=SUM(资金流向,5);
近10日流向:=SUM(资金流向,10);
主力资金线:=(L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1))/100.0,LINETHICK2;
主力买力度:=LARGEINTRDVOL*100/VOL;
主力卖力度:=LARGEOUTTRDVOL*100/VOL;
DRAWRECTREL(0,0,235,999,RGB(100,330,30));
DRAWRECTREL(0,0,235,507,RGB(0,30,50));
DRAWRECTREL(75,515,235,999,RGB(0,30,50));
DRAWRECTREL(144,0,235,507,RGB(100,330,30));
DRAWRECTREL(0,507,235,600,RGB(100,330,30));
AA:=CONST(MAX(ABS(净流入),MAX(ABS(大宗净流入),MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出)))))))*3,NODRAW;
DRAWRECTREL(5,CONST(830-(ABS(净流入)*500/AA)),35,945,IF(CONST(净流入)>0,RGB(250,150,10),RGB(0,100,100)));
DRAWRECTREL(40,CONST(830-(ABS(大宗净流入)*500/AA)),70,945,IF(CONST(大宗净流入)>0,RGB(250,150,10),RGB(0,100,100)));
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.005,0.88,0,INTPART(净流入)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.041,0.88,0,INTPART(大宗净流入)),COLORWHITE;
DRAWRECTREL(80,CONST(830-(ABS(大宗进)*500/AA)),115,945,IF(CONST(大宗进)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(117,CONST(830-(ABS(大宗出)*500/AA)),152,945,IF(CONST(大宗出)<0,RGB(0,50,0),RGB(0,50,0)));
DRAWRECTREL(158,CONST(830-(ABS(非大宗进)*500/AA)),193,945,IF(CONST(非大宗进)>0,RGB(255,0,0),RGB(23,125,255)));
DRAWRECTREL(195,CONST(830-(ABS(非大宗出)*500/AA)),230,945,IF(CONST(非大宗出)<0,RGB(0,50,0),RGB(0,50,0)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.007,1,0,'净流 大宗流 主力 进出 散户 进出'),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.082,0.88,0,INTPART(大宗进)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.12,0.88,0,INTPART(大宗出)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.161,0.88,0,INTPART(非大宗进)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.196,0.88,0,INTPART(非大宗出)),COLORWHITE;
AAB:=CONST(MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单))))),NODRAW;
DRAWRECTREL(5,CONST(830-(ABS(超大单)*500/AAB))/2,35,460,IF(CONST(超大单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWRECTREL(40,CONST(830-(ABS(大单)*500/AAB))/2,70,460,IF(CONST(大单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWRECTREL(75,CONST(830-(ABS(中单)*500/AAB))/2,105,460,IF(CONST(中单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWRECTREL(110,CONST(830-(ABS(小单)*500/AAB))/2,140,460,IF(CONST(小单)>0,RGB(255,0,255),RGB(0,255,255)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.007,0.46,0,'超 户 大 户 中 户 散户 5日流 10日流'),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.007,0.4,0,INTPART(超大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.042,0.4,0,INTPART(大单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.076,0.4,0,INTPART(中单)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.112,0.4,0,INTPART(小单)),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0,0,0,'【综合资金分析】 (¥万元)'),COLORRED;
AAC:=CONST(MAX(ABS(近5日流向),ABS(近10日流向))),NODRAW;
DRAWRECTREL(149,CONST(830-(ABS(近5日流向)*500/AAC))/2,189,460,IF(CONST(近5日流向)>0,RGB(250,150,10),RGB(0,100,100)));
DRAWRECTREL(191,CONST(830-(ABS(近10日流向)*500/AAC))/2,230,460,IF(CONST(近10日流向)>0,RGB(250,150,10),RGB(0,100,100)));
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.15,0.4,0,INTPART(近5日流向)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.19,0.4,0,INTPART(近10日流向)),COLORWHITE;
DDX:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*1000/FINANCE(7);
DDY:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);
DDZ:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);
DRAWRECTREL(144,0,235,40,IF(CONST(DDX)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(144,45,235,85,IF(CONST(DDY)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(144,90,235,130,IF(CONST(DDZ)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWTEXT_FIX(1,0.15,0,0,STRCAT('DDX:',VAR2STR(DDX,2))),COLORYELLOW;
DRAWTEXT_FIX(1,0.15,0.04,0,STRCAT('DDY:',VAR2STR(DDY,2))),COLORYELLOW;
DRAWTEXT_FIX(1,0.15,0.09,0,STRCAT('DDZ:',VAR2STR(DDZ,2))),COLORYELLOW;
DRAWTEXT_FIX(1,0.16,0.508,0,STRCAT('主力买力度:',CON2STR(主力买力度,0))),COLORYELLOW;
DRAWTEXT_FIX(1,0.16,0.553,0,STRCAT('主力卖力度:',CON2STR(主力卖力度,0))),COLORMAGENTA;
日3大宗净流入:=REF(大宗净流入,1)+REF(大宗净流入,2)+REF(大宗净流入,3);
日5大宗净流入:=REF(大宗净流入,1)+REF(大宗净流入,2)+REF(大宗净流入,3)+REF(大宗净流入,4)+REF(大宗净流入,5);
DRAWTEXT_FIX(1,0,0.508,0,STRCAT('3日大宗流:',CON2STR(日3大宗净流入,0))),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.553,0,STRCAT('5日大宗流:',CON2STR(日5大宗净流入,0))),COLORMAGENTA;
未来函数检测结果如下:
该公式包含未来函数:FINANCE
该公式包含未来函数:DVOL
解密、定制、编写股票指标请联系QQ或微信同号:88652583
相关股票指标公式
如果 到最后交易的周期=1 AND 周期类型=5返回成交量*240/FROM开盘价否则返回成交量
当满足条件 到最后交易的周期=1 AND 周期类型=5时,在预测量和0之间画柱状线
输出{成交量}
量:成交量,成交量STICK
{倍量}
量差赋值:IF( 到最后交易的周期=1,成交量*240/FROM开盘价/1日前的成交量-1,成交量/1日前的成交量-1),NODRAW, COLORLIMAGENTA
当满足条件量差>=1时,在0和成交量之间画柱状线
V12赋值:V的12日简单移动平均
STICKLINE(成交量<成交量的5日简单移动平均/2 AND V输出VOL5:量的5日简单移动平均,画白色
输出VOL35:量的35日简单移动平均,画黄色
超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
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0)
净流入赋值:(超B+大B+中B+小B)+(超S+大S+中S+小S)
大宗净流入赋值:(超B+大B)+(超S+大S)
超大单赋值:(超B)+(超S)
大单赋值:(大B)+(大S)
中单赋值:(中B)+(中S)
小单赋值:(小B)+(小S)
大宗进赋值:(超B)+(大B)
大宗出赋值:(超S)+(大S)
非大宗进赋值:(中B)+(小B)
非大宗出赋值:(中S)+(小S)
资金流向赋值:(超B+大B+中B+小B)+(超S+大S+中S+小S)
近5日流向赋值:5的资金流向日累和
近10日流向赋值:10的资金流向日累和
主力资金线赋值:(L2_AMO(0,0)+L2_AMO(1,0)-L2_AMO(0,1)-L2_AMO(1,1))/100.0, 线宽为2
主力买力度赋值:LARGEINTRD成交量*100/成交量
主力卖力度赋值:LARGEOUTTRD成交量*100/成交量
DRAWRECTREL(0,0,235,999,RGB(100,330,30))
DRAWRECTREL(0,0,235,507,RGB(0,30,50))
DRAWRECTREL(75,515,235,999,RGB(0,30,50))
DRAWRECTREL(144,0,235,507,RGB(100,330,30))
DRAWRECTREL(0,507,235,600,RGB(100,330,30))
AA赋值:CONST(MAX(净流入的绝对值,MAX(ABS(大宗净流入),MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出)))))))*3,NODRAW
DRAWRECTREL(5,CONST(830-(净流入的绝对值*500/AA)),35,945,IF(CONST(净流入)>0,RGB(250,150,10),RGB(0,100,100)))
DRAWRECTREL(40,CONST(830-(大宗净流入的绝对值*500/AA)),70,945,IF(CONST(大宗净流入)>0,RGB(250,150,10),RGB(0,100,100)))
DRAWNUMBER_FIX( 到最后交易的周期=1,0.005,0.88,0,INTPART(净流入)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.041,0.88,0,INTPART(大宗净流入)),画白色
DRAWRECTREL(80,CONST(830-(大宗进的绝对值*500/AA)),115,945,IF(CONST(大宗进)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(117,CONST(830-(大宗出的绝对值*500/AA)),152,945,IF(CONST(大宗出)<0,RGB(0,50,0),RGB(0,50,0)))
DRAWRECTREL(158,CONST(830-(非大宗进的绝对值*500/AA)),193,945,IF(CONST(非大宗进)>0,RGB(255,0,0),RGB(23,125,255)))
DRAWRECTREL(195,CONST(830-(非大宗出的绝对值*500/AA)),230,945,IF(CONST(非大宗出)<0,RGB(0,50,0),RGB(0,50,0)))
当满足条件 到最后交易的周期=1时,在横轴0.007纵轴1位置书写文字
DRAWNUMBER_FIX( 到最后交易的周期=1,0.082,0.88,0,INTPART(大宗进)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.12,0.88,0,INTPART(大宗出)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.161,0.88,0,INTPART(非大宗进)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.196,0.88,0,INTPART(非大宗出)),画白色
AAB:=CONST(MAX(超大单的绝对值,MAX(ABS(大单),MAX(ABS(中单),ABS(小单))))),NODRAW
DRAWRECTREL(5,CONST(830-(超大单的绝对值*500/AAB))/2,35,460,IF(CONST(超大单)>0,RGB(255,0,255),RGB(0,255,255)))
DRAWRECTREL(40,CONST(830-(大单的绝对值*500/AAB))/2,70,460,IF(CONST(大单)>0,RGB(255,0,255),RGB(0,255,255)))
DRAWRECTREL(75,CONST(830-(中单的绝对值*500/AAB))/2,105,460,IF(CONST(中单)>0,RGB(255,0,255),RGB(0,255,255)))
DRAWRECTREL(110,CONST(830-(小单的绝对值*500/AAB))/2,140,460,IF(CONST(小单)>0,RGB(255,0,255),RGB(0,255,255)))
当满足条件 到最后交易的周期=1时,在横轴0.007纵轴0.46位置书写文字
DRAWNUMBER_FIX( 到最后交易的周期=1,0.007,0.4,0,INTPART(超大单)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.042,0.4,0,INTPART(大单)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.076,0.4,0,INTPART(中单)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.112,0.4,0,INTPART(小单)),画白色
DRAWTEXT_FIX( 到最后交易的周期=1,0,0,0,'【综合资金分析】 (¥万元)'),画红色
AAC:=CONST(MAX(近5日流向的绝对值,ABS(近10日流向))),NODRAW
DRAWRECTREL(149,CONST(830-(近5日流向的绝对值*500/AAC))/2,189,460,IF(CONST(近5日流向)>0,RGB(250,150,10),RGB(0,100,100)))
DRAWRECTREL(191,CONST(830-(近10日流向的绝对值*500/AAC))/2,230,460,IF(CONST(近10日流向)>0,RGB(250,150,10),RGB(0,100,100)))
DRAWNUMBER_FIX( 到最后交易的周期=1,0.15,0.4,0,INTPART(近5日流向)),画白色
DRAWNUMBER_FIX( 到最后交易的周期=1,0.19,0.4,0,INTPART(近10日流向)),画白色
DDX赋值:(LARGEINTRD成交量-LARGEOUTTRD成交量)*1000/FINANCE(7)
DDY赋值:IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0)
DDZ赋值:IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0)
DRAWRECTREL(144,0,235,40,IF(CONST(DDX)>0,RGB(255,0,0),RGB(0,50,0)))
DRAWRECTREL(144,45,235,85,IF(CONST(DDY)>0,RGB(255,0,0),RGB(0,50,0)))
DRAWRECTREL(144,90,235,130,IF(CONST(DDZ)>0,RGB(255,0,0),RGB(0,50,0)))
DRAWTEXT_FIX(1,0.15,0,0,STRCAT('输出DDX:',VAR2STR(DDX,2))),画黄色
DRAWTEXT_FIX(1,0.15,0.04,0,STRCAT('输出DDY:',VAR2STR(DDY,2))),画黄色
DRAWTEXT_FIX(1,0.15,0.09,0,STRCAT('输出DDZ:',VAR2STR(DDZ,2))),画黄色
DRAWTEXT_FIX(1,0.16,0.508,0,STRCAT('输出主力买力度:',CON2STR(主力买力度,0))),画黄色
DRAWTEXT_FIX(1,0.16,0.553,0,STRCAT('输出主力卖力度:',CON2STR(主力卖力度,0))),画洋红色
日3大宗净流入赋值:1日前的大宗净流入+2日前的大宗净流入+3日前的大宗净流入
日5大宗净流入赋值:1日前的大宗净流入+2日前的大宗净流入+3日前的大宗净流入+4日前的大宗净流入+5日前的大宗净流入
输出DRAWTEXT_FIX(1,0,0.508,0,STRCAT('3日大宗流:',CON2STR(日3大宗净流入,0))),画黄色
输出DRAWTEXT_FIX(1,0,0.553,0,STRCAT('5日大宗流:',CON2STR(日5大宗净流入,0))),画洋红色