「翔博精选指标」资金流向统计,量化统计资金流向(通达信公式 主
2022-05-03原创 编 辑:翔博软件
{资金流向统计}
DRAWRECTREL(999,999,0,0,RGB(88,98,108));
DRAWRECTREL(0,0,999,999,RGB(20,18,12));
净买量统计:=ACTINVOL-ACTOUTVOL,NODRAW;
当日净买量:ACTINVOL-ACTOUTVOL,NODRAW;
二日净买量:SUM(净买量统计,2),NODRAW;
三日净买量:SUM(净买量统计,3),NODRAW;
五日净买量:SUM(净买量统计,5),NODRAW;
十日净买量:SUM(净买量统计,10),NODRAW;
二十日净买量:SUM(净买量统计,20),NODRAW;
三十日净买量:SUM(净买量统计,30),NODRAW;
六十日净买量:SUM(净买量统计,60),NODRAW;
一百日净买量:SUM(净买量统计,100),NODRAW;
二百日净买量:SUM(净买量统计,200),NODRAW;
三百日净买量:SUM(净买量统计,300),NODRAW;
四百日净买量:SUM(净买量统计,400),NODRAW;
五百日净买量:SUM(净买量统计,500),NODRAW;
DRAWTEXT_FIX(ISLASTBAR=1,0.01,0.02,0,STKNAME),COLOR80FFFF ;
DRAWTEXT_FIX(ISLASTBAR=1,0.08,0.02,0,CODE) COLOR0000FF;
DRAWTEXT_FIX(1,0.1531,0.18,1,STRCAT('当日净买量:',CON2STR(当日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.28,1,STRCAT('二日净买量:',CON2STR(二日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.38,1,STRCAT('三日净买量:',CON2STR(三日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.48,1,STRCAT('五日净买量:',CON2STR(五日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.58,1,STRCAT('十日净买量:',CON2STR(十日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.68,1,STRCAT('二十日净买量:',CON2STR(二十日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.78,1,STRCAT('三十日净买量:',CON2STR(三十日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.88,1,STRCAT('六十日净买量:',CON2STR(六十日净买量,2))),COLORFF00FF;
DRAWTEXT_FIX(1,0.1531,0.98,1,STRCAT('一百日净买量:',CON2STR(一百日净买量,2))),COLORFF00FF;
主力净量:(L2_VOL(0,0)+L2_VOL(1,0))-(L2_VOL(0,1)+L2_VOL(1,1)),COLORFFFFFF,NODRAW;
主力主动净量:(L2_VOL(0,2)+L2_VOL(1,2))-(L2_VOL(0,3)+L2_VOL(1,3)),COLOR0000FF,NODRAW;
主力净额:((L2_AMO(0,0)+L2_AMO(1,0))-(L2_AMO(0,1)+L2_AMO(1,1)))/10000,COLORFFFFFF,NODRAW;
主力主动净额:((L2_AMO(0,2)+L2_AMO(1,2))-(L2_AMO(0,3)+L2_AMO(1,3)))/10000,COLOR0000FF,NODRAW;
全部主动净额:((L2_AMO(0,2)+L2_AMO(1,2)+L2_AMO(2,2)+L2_AMO(3,2))-(L2_AMO(0,3)+L2_AMO(1,3)+L2_AMO(2,3)+L2_AMO(3,3)))/10000,COLORFF00FF,NODRAW;
{周涨跌}
周O:=O#WEEK,NODRAW;
周H:=H#WEEK,NODRAW;
周L:=L#WEEK,NODRAW;
周C:=C#WEEK,NODRAW;
周绝对涨幅:=(周H-周L)/周L*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.98,1,STRCAT('周绝对涨幅:',CON2STR(周绝对涨幅,2))),COLORWHITE;
周实体涨幅:=(周C-周O)/周O*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.88,1,STRCAT('周实体涨幅:',CON2STR(周实体涨幅,2))),COLORWHITE;
当日实体涨幅:=(C-O)/O*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.78,1,STRCAT('当日实体涨幅:',CON2STR(当日实体涨幅,2))),COLORWHITE;
当日绝对涨幅:=(H-L)/L*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.68,1,STRCAT('当日绝对涨幅:',CON2STR(当日绝对涨幅,2))),COLORWHITE;
前1日绝对涨幅:=(REF(H,1)-REF(L,1))/REF(L,1)*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.58,1,STRCAT('前1日绝对涨幅:',CON2STR(前1日绝对涨幅,2))),COLORWHITE;
前2日绝对涨幅:=(REF(H,2)-REF(L,2))/REF(L,2)*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.48,1,STRCAT('前2日绝对涨幅:',CON2STR(前2日绝对涨幅,2))),COLORWHITE;
前3日绝对涨幅:=(REF(H,3)-REF(L,3))/REF(L,3)*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.38,1,STRCAT('前3日绝对涨幅:',CON2STR(前3日绝对涨幅,2))),COLORWHITE;
前4日绝对涨幅:=(REF(H,4)-REF(L,4))/REF(L,4)*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.28,1,STRCAT('前4日绝对涨幅:',CON2STR(前4日绝对涨幅,2))),COLORWHITE;
前5日绝对涨幅:=(REF(H,5)-REF(L,5))/REF(L,5)*100,NODRAW;
DRAWTEXT_FIX(1,0.991,0.18,1,STRCAT('前5日绝对涨幅:',CON2STR(前5日绝对涨幅,2))),COLORWHITE;
B1X:=WEEKOFYEAR!=REF(WEEKOFYEAR,1);
Y1X:=VARCAT(VAR2STR(WEEKOFYEAR,0),' 周 ');
DRAWTEXT(B1X,LOW,Y1X),COLORWHITE;
{年月日星期}
DA:=YEAR AND MONTH AND DAY;
AA1:=STRCAT(CON2STR(YEAR,0),'年');
AA2:=STRCAT(CON2STR(MONTH,0),'月');
AA3:=STRCAT(CON2STR(DAY,0),'日');
AA4:=STRCAT('【',IF(WEEKDAY=1,'星期一',IF(WEEKDAY=2,'星期二',
IF(WEEKDAY=3,'星期三',IF(WEEKDAY=4,'星期四',IF
(WEEKDAY=5,'星期五',IF(WEEKDAY=6,'星期六','星期日')))))));
AA:=STRCAT(STRCAT(STRCAT(AA1,AA2),STRCAT(AA3,AA4)),'】');
DRAWTEXT_FIX(DA,0.851,0.02,0,AA),COLORWHITE;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
A111:=FINANCE(42);
A211:=DATETODAY(CONST(DATE));
A311:=A211-A111;
XDATE:=DAYTODATE(A311)+19000000;
上市日期:=STRCAT(' 上市日期: ',CON2STR(XDATE,0));
DRAWTEXT_FIX(ISLASTBAR,0.5,0.02,0,上市日期),COLORMAGENTA;
SSTS1:=STRCAT('上市',CON2STR(FINANCE(42),0));
SSTS2:=STRCAT(SSTS1,'天');
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.618,0.02,0,SSTS2),COLORCYAN;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.4,0.980,0,'复盘步骤:第一步分析时空关系,
第二步辨别多空方向,第三步制定交易计划'),COLORRED;