通达信全周期净量指标公式

2015}
T00:=200;
AF1:=300;
FX:=IF(C>REF(C,1),1,IF(C<REF(C,1),}
{买方}
B01:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M02),CONST(M03) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B04:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M05),CONST(M06) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B07:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M08),CONST(M09) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B10:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M11),CONST(M12) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B13:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M14),CONST(M15) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B16:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M17),CONST(M18) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B19:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M20),CONST(M21) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B22:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M23),CONST(M24) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B25:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M26),CONST(M27) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B28:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M29),CONST(M30) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B31:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M32),CONST(M33) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B34:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M35),CONST(M36) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B37:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M38),CONST(M39) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
B40:=CONST(SUM(IF(RANGE(C,1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S02:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M02),CONST(M03) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S05:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M05),CONST(M06) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S08:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M08),CONST(M09) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S11:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M11),CONST(M12) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S14:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M14),CONST(M15) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S17:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M17),CONST(M18) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S20:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M20),CONST(M21) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S23:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M23),CONST(M24) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S26:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M26),CONST(M27) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S29:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M29),CONST(M30) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S32:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M32),CONST(M33) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S35:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M35),CONST(M36) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S38:=CONST(SUM(IF(RANGE(C,MINDIFF+CONST(M38),CONST(M39) ),IF( FX=1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
BS01:=B01S03;BS04:=B04S06;BS07:=B07S09;BS10:=B10S12;BS13:=B13S15;
BS16:=B16S18;BS19:=B19S21;BS22:=B22S24;BS25:=B25S27;BS28:=B28S30;
BS31:=B31S33;BS34:=B34S36;BS37:=B37S39;BS40:=B40ABS(BS02)/MAXBS*300,955,1000,975,IF(BS02>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS05)/MAXBS*300,880,1000,900,IF(BS05>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS08)/MAXBS*300,805,1000,825,IF(BS08>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS11)/MAXBS*300,730,1000,750,IF(BS11>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS14)/MAXBS*300,655,1000,675,IF(BS14>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS17)/MAXBS*300,580,1000,600,IF(BS17>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS20)/MAXBS*300,505,1000,525,IF(BS20>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS23)/MAXBS*300,430,1000,450,IF(BS23>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS26)/MAXBS*300,355,1000,375,IF(BS26>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS29)/MAXBS*300,280,1000,300,IF(BS29>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS32)/MAXBS*300,205,1000,225,IF(BS32>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS35)/MAXBS*300,130,1000,150,IF(BS35>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000ABS(BS38)/MAXBS*300,055,1000,75,IF(BS38>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(10001,V,0),TT)/SUM(V,TT)*100;
平衡:=SUM(IF(FX=0,V,0),TT)/SUM(V,TT)*100;
DRAWRECTREL(0,0,CONST(多方*2.5),100,RGB(200,50,50));
DRAWRECTREL(CONST(多方*2.5),0,CONST(多方*2.5+平衡*2.5),100,RGB(200,200,50));
DRAWRECTREL(CONST(多方*2.5+平衡*2.5),0,250,100,RGB(50,200,50));
DRAWTEXT_FIX(1,0,0.1,0,STRCAT(STRCAT(STRCAT('多方:',CON2STR(多方,1)),
STRCAT('平衡:',CON2STR(平衡,1))),STRCAT('空方:',CON2STR(空方,1)))),COLORYELLOW;
DRAWTEXT_FIX(1,0,0,0,STRCAT('最小单位:',CON2STR(单位,3))),COLORLIGRAY;
分时线:IF(PERIOD=0,C,DRAWNULL),COLORWHITE,LINETHICK3;
均价:SUM(AMOUNT/100,T00)/SUM(V,T00),COLORYELLOW,LINETHICK2;
DRAWKLINE(H,O,L,C);
DRAWTEXT_FIX(1,0.5,0,1,STRCAT(STRCAT('行业:',HYBLOCK),STRCAT('◆◆',DYBLOCK))),COLORYELLOW;
DRAWTEXT_FIX(1,0.5,0.05,1,STRCAT('风格',FGBLOCK)),COLORLIGRAY;
DRAWTEXT_FIX(1,0.5,0.1,1,STRCAT('流通盘(亿元):',CON2STR(FINANCE(7)/100000000,3))),COLORGREEN;
DRAWTEXT_FIX(1,0,1,0,'分析图中除一分钟分析图之外,更改T00设置不同选取周期,0是全周期,默认200'),COLORLIGRAY;
DRAWTEXT_FIX(1,0,0.9,0,'仅供股票与公式成员研究使用'),COLORMAGENTA;

通达信全周期净量指标公式的选股公式