S12:=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));
S13:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M12),CONST(M13) ),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(M13),CONST(M14) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S15:=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));
S16:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M15),CONST(M16) ),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(M16),CONST(M17) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S18:=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));
S19:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M18),CONST(M19) ),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(M19),CONST(M20) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S21:=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));
S22:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M21),CONST(M22) ),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(M22),CONST(M23) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S24:=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));
S25:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M24),CONST(M25) ),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(M25),CONST(M26) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S27:=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));
S28:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M27),CONST(M28) ),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(M28),CONST(M29) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S30:=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));
S31:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M30),CONST(M31) ),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(M31),CONST(M32) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S33:=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));
S34:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M33),CONST(M34) ),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(M34),CONST(M35) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S36:=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));
S37:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M36),CONST(M37) ),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(M37),CONST(M38) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
S39:=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));
S40:=CONST(SUM(IF(RANGE(C,-MINDIFF+CONST(M39),CONST(M40+MINDIFF) ),IF( FX=-1,0.9*V,IF(FX=0,0.5*V,0.1*V)),0),TT));
BS01:=B01-S01;BS02:=B02-S02;BS03:=B03-S03;BS04:=B04-S04;BS05:=B05-S05;
BS06:=B06-S06;BS07:=B07-S07;BS08:=B08-S08;BS09:=B09-S09;BS10:=B10-S10;
BS11:=B11-S11;BS12:=B12-S12;BS13:=B13-S13;BS14:=B14-S14;BS15:=B15-S15;
BS16:=B16-S16;BS17:=B17-S17;BS18:=B18-S18;BS19:=B19-S19;BS20:=B20-S20;
BS21:=B21-S21;BS22:=B22-S22;BS23:=B23-S23;BS24:=B24-S24;BS25:=B25-S25;
BS26:=B26-S26;BS27:=B27-S27;BS28:=B28-S28;BS29:=B29-S29;BS30:=B30-S30;
BS31:=B31-S31;BS32:=B32-S32;BS33:=B33-S33;BS34:=B34-S34;BS35:=B35-S35;
BS36:=B36-S36;BS37:=B37-S37;BS38:=B38-S38;BS39:=B39-S39;BS40:=B40-S40;
{最大量柱}
MAXBS1:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(ABS(BS01),ABS(BS02)),ABS(BS03))
,ABS(BS04)),ABS(BS05)),ABS(BS06)),ABS(BS07)),ABS(BS08)),ABS(BS09)),ABS(BS10));
MAXBS2:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(ABS(BS11),ABS(BS12)),ABS(BS13))
,ABS(BS14)),ABS(BS15)),ABS(BS16)),ABS(BS17)),ABS(BS18)),ABS(BS19)),ABS(BS20));
MAXBS3:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(ABS(BS21),ABS(BS22)),ABS(BS23))
,ABS(BS24)),ABS(BS25)),ABS(BS26)),ABS(BS27)),ABS(BS28)),ABS(BS29)),ABS(BS30));
MAXBS4:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(ABS(BS31),ABS(BS32)),ABS(BS33))
,ABS(BS34)),ABS(BS35)),ABS(BS36)),ABS(BS37)),ABS(BS38)),ABS(BS39)),ABS(BS40));
MAXBS:=MAX(MAX(MAX(MAXBS1,MAXBS2),MAXBS3),MAXBS4);
DRAWRECTREL(1000-ABS(BS01)/MAXBS*300,980,1000,1000,IF(BS01>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS02)/MAXBS*300,955,1000,975,IF(BS02>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS03)/MAXBS*300,930,1000,950,IF(BS03>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS04)/MAXBS*300,905,1000,925,IF(BS04>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS05)/MAXBS*300,880,1000,900,IF(BS05>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS06)/MAXBS*300,855,1000,875,IF(BS06>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS07)/MAXBS*300,830,1000,850,IF(BS07>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS08)/MAXBS*300,805,1000,825,IF(BS08>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS09)/MAXBS*300,780,1000,800,IF(BS09>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS10)/MAXBS*300,755,1000,775,IF(BS10>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS11)/MAXBS*300,730,1000,750,IF(BS11>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS12)/MAXBS*300,705,1000,725,IF(BS12>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS13)/MAXBS*300,680,1000,700,IF(BS13>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS14)/MAXBS*300,655,1000,675,IF(BS14>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS15)/MAXBS*300,630,1000,650,IF(BS15>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS16)/MAXBS*300,605,1000,625,IF(BS16>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS17)/MAXBS*300,580,1000,600,IF(BS17>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS18)/MAXBS*300,555,1000,575,IF(BS18>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS19)/MAXBS*300,530,1000,550,IF(BS19>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS20)/MAXBS*300,505,1000,525,IF(BS20>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS21)/MAXBS*300,480,1000,500,IF(BS21>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS22)/MAXBS*300,455,1000,475,IF(BS22>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS23)/MAXBS*300,430,1000,450,IF(BS23>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS24)/MAXBS*300,405,1000,425,IF(BS24>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS25)/MAXBS*300,380,1000,400,IF(BS25>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS26)/MAXBS*300,355,1000,375,IF(BS26>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS27)/MAXBS*300,330,1000,350,IF(BS27>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS28)/MAXBS*300,305,1000,325,IF(BS28>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS29)/MAXBS*300,280,1000,300,IF(BS29>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS30)/MAXBS*300,255,1000,275,IF(BS30>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS31)/MAXBS*300,230,1000,250,IF(BS31>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS32)/MAXBS*300,205,1000,225,IF(BS32>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS33)/MAXBS*300,180,1000,200,IF(BS33>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS34)/MAXBS*300,155,1000,175,IF(BS34>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS35)/MAXBS*300,130,1000,150,IF(BS35>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS36)/MAXBS*300,105,1000,125,IF(BS36>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS37)/MAXBS*300,080,1000,100,IF(BS37>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS38)/MAXBS*300,055,1000,75,IF(BS38>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS39)/MAXBS*300,030,1000,50,IF(BS39>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(1000-ABS(BS40)/MAXBS*300,005,1000,25,IF(BS40>0,RGB(200,0,0),RGB(0,200,0)));
DRAWRECTREL(0,0,250,170,RGB(50,50,100));
多方:=SUM(IF(FX=1,V,0),TT)/SUM(V,TT)*100;
空方:=SUM(IF(FX=-1,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; |