{}
DRAWRECTREL(0,530,300,998,IF(100,RGB(0,15,15),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;
TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0);
大宗进:=(超B)+(大B),NODRAW;
大宗出:=(超S)+(大S),NODRAW;
非大宗进:=(中B)+(小B),NODRAW;
非大宗出:=(中S)+(小S),NODRAW;
大宗进限制:=IF((超B+大B)=0,0,大宗进),NODRAW;
大宗出限制:=IF((超S+大S)=0,0,大宗出),NODRAW;
非大宗进限制:=IF(中B+小B=0,0,非大宗进),NODRAW;
非大宗出限制:=IF(中S+小S=0,0,非大宗出),NODRAW;
主力净流入:=(超B+大B)-(超S+大S),COLORRED,NODRAW;
散户净流入:=(中B+小B)-(中S+小S),COLORRED,NODRAW;
净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S),COLORRED,NODRAW;
大单流入:=(超B+大B)/(超B+大B+超S+大S)*100,NODRAW;
大单流入限制:=IF((超B+大B+超S+大S)=0,0,大单流入);
大单流出比:=(超S+大S)/(超B+大B+超S+大S)*100,NODRAW;
大单流出限制:=IF((超B+大B+超S+大S)=0,0,大单流出比);
总流入比:=(超B+大B+中B+小B)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;
总流出比:=(超S+大S+中S+小S)/(超B+大B+中B+小B+超S+大S+中S+小S)*100,NODRAW;
成交总量:=(超B+大B+中B+小B+超S+大S+中S+小S),NODRAW;
机构参与度:=(超B+超S+大B+大S)/成交总量*100,COLORYELLOW,NODRAW;
大单强度:=(超B+大B-超S-大S)/成交总量*100,COLORYELLOW,NODRAW;
大单强度限制:=IF(大单强度=0,-100,大单强度);
大单强度比:=IF(大单强度>=0,(大单强度限制+100)/2,100-ABS((大单强度限制-100)/2)),NODRAW;
超单强度:=(超B-超S)/(超B+超S)*100,COLORYELLOW,NODRAW;
超单强度限制:=IF(超单强度=0,-100,超单强度);
超单强度比:=IF(超单强度>0,(超单强度限制+100)/2,IF(超单强度<0,100-ABS((超单强度限制-100)/2),0)),NODRAW;
DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗出))))),NODRAW;
DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,39,970,IF(CONST(大宗进>0),RGB(250,125,0),RGB(25,150,250)));
DRAWRECTREL(43,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,82,970,IF(CONST(大宗出>0),RGB(25,150,250),RGB(250,125,0)));
DRAWRECTREL(151,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,190,970,IF(CONST(非大宗进>0),RGB(250,125,0),RGB(25,150,250)));
DRAWRECTREL(195,CONST(950-(ABS(非大宗出)*250/DAZHIV))-20,234,970,IF(CONST(非大宗出>0),RGB(25,150,250),RGB(250,125,0)));
{DRAWRECTREL(204,CONST(950-(ABS(净流入)*250/DAZHIV))-20,234,970,IF(CONST(净流入>0),RGB(200,0,0),RGB(0,125,50)));}
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.00,1,0,'资金驱动 主力进出 资金驱动 散户进出'),COLORWHITE;
DRAWTEXT_FIX(1,0.005,0.88,0,STRCAT(STRCAT(' ',CON2STR(大宗进限制,0)),'')),COLORWHITE;
DRAWTEXT_FIX(1,0.042,0.88,0,STRCAT(STRCAT(' ',CON2STR(大宗出限制,0)),'')),COLORWHITE;
DRAWTEXT_FIX(1,0.151,0.88,0,STRCAT(STRCAT(' ',CON2STR(非大宗进限制,0)),'')),COLORWHITE;
DRAWTEXT_FIX(1,0.196,0.88,0,STRCAT(STRCAT(' ',CON2STR(非大宗出限制,0)),'')),COLORWHITE;
主买A:=ACTINVOL,COLORRED,NODRAW;
主卖A:=ACTOUTVOL,COLORGREEN,NODRAW;
主买:=主买A*100/(主买A+主卖A),NODRAW,COLORRED;
主卖:=主卖A*100/(主买A+主卖A),NODRAW,COLORGREEN;
主力买力度:=LARGEINTRDVOL*100/VOL,NODRAW;
主力卖力度:=LARGEOUTTRDVOL*100/VOL,NODRAW;
DRAWRECTREL(50,530,234,580,RGB(0,250,50));
DRAWRECTREL(50,530,234,580,RGB(0,100,0));
DRAWRECTREL(50,530,80+CONST(主买*160/100),580,RGB(175,50,250));
DRAWTEXT_FIX(1,0.00,0.54,0,STRCAT(STRCAT('主动买卖比 ',CON2STR(主买,0)),' ')),COLORYELLOW;
DRAWTEXT_FIX(1,0.21,0.54,0,STRCAT(STRCAT(' ',CON2STR(主卖,0)),' ')),COLORYELLOW;
DRAWRECTREL(50,580,234,630,RGB(0,75,200));
DRAWRECTREL(50,580,234,630,RGB(0,250,50));
DRAWRECTREL(50,580,80+CONST(主力买力度*160/100),630,RGB(200,0,50));
DRAWTEXT_FIX(1,0.00,0.59,0,STRCAT(STRCAT('主动买卖力 ',CON2STR(主力买力度,0)),'')),COLORYELLOW;
DRAWTEXT_FIX(1,0.21,0.59,0,STRCAT(STRCAT(' ',CON2STR(主力卖力度,0)),'')),COLORYELLOW;
DDX:=(LARGEINTRDVOL-LARGEOUTTRDVOL)*100000/FINANCE(7),NODRAW;
DDY:=IF(TRADENUM>0,(TRADEOUTNUM-TRADEINNUM)*100/TRADENUM,0);
DDZ:=IF(TRADENUM>0,(LARGETRDINNUM-LARGETRDOUTNUM)/TRADENUM*100,0);
DRAWRECTREL(234,530,300,580,IF(CONST(DDX)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(234,580,300,630,IF(CONST(DDX)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(234,692,300,742,IF(CONST(DDY)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(234,742,300,792,IF(CONST(DDY)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(234,842,300,892,IF(CONST(DDZ)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWRECTREL(234,892,300,942,IF(CONST(DDZ)>0,RGB(255,0,0),RGB(0,50,0)));
DRAWTEXT_FIX(1,0.24,0.54,0,STRCAT('',CON2STR(DDX,3))),COLORYELLOW;
DRAWTEXT_FIX(1,0.24,0.70,0,STRCAT('',CON2STR(DDY,3))),COLORYELLOW;
DRAWTEXT_FIX(1,0.24,0.85,0,STRCAT('',CON2STR(DDZ,3))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.24,0.65,0,'大 单 动 向'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.24,0.80,0,'涨 跌 动 因'),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.24,0.95,0,'大 单 差 分'),COLORWHITE;
T1:=IF (DDX>0 AND REF(DDX,1)<0,1,0);
T2:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)<0,2,T1);
T3:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)<0,3,T2);
T4:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)<0,4,T3);
T5:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)<0,5,T4);
T6:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)<0,6,T5);
T7:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)<0,7,T6);
T8:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)<0,8,T7);
T9:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)<0,9,T8);
T:=IF (DDX>0 AND REF(DDX,1)>0 AND REF(DDX,2)>0 AND REF(DDX,3)>0 AND REF(DDX,4)>0 AND REF(DDX,5)>0 AND REF(DDX,6)>0 AND REF(DDX,7)>0 AND REF(DDX,8)>0 AND REF(DDX,9)>0,10,T9);
DRAWTEXT_FIX(1,0.24,0.59,0,STRCAT(STRCAT(' ',CON2STR(T,0)),' [天] ')),COLORYELLOW;
T11:=IF (DDY>0 AND REF(DDY,1)<0,1,0);
T21:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)<0,2,T11);
T31:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)<0,3,T21);
T41:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)<0,4,T31);
T51:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)<0,5,T41);
T61:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)<0,6,T51);
T71:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)<0,7,T61);
T81:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)<0,8,T71);
T91:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)<0,9,T81);
TY:=IF (DDY>0 AND REF(DDY,1)>0 AND REF(DDY,2)>0 AND REF(DDY,3)>0 AND REF(DDY,4)>0 AND REF(DDY,5)>0 AND REF(DDY,6)>0 AND REF(DDY,7)>0 AND REF(DDY,8)>0 AND REF(DDY,9)>0,10,T91);
DRAWTEXT_FIX(1,0.24,0.75,0,STRCAT(STRCAT(' ',CON2STR(TY,0)),' [天] ')),COLORYELLOW;
T1Z:=IF (DDZ>0 AND REF(DDZ,1)<0,1,0);
T2Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)<0,2,T1Z);
T3Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)<0,3,T2Z);
T4Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)<0,4,T3Z);
T5Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)<0,5,T4Z);
T6Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)<0,6,T5Z);
T7Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)<0,7,T6Z);
T8Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)<0,8,T7Z);
T9Z:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)<0,9,T8Z);
TZ:=IF (DDZ>0 AND REF(DDZ,1)>0 AND REF(DDZ,2)>0 AND REF(DDZ,3)>0 AND REF(DDZ,4)>0 AND REF(DDZ,5)>0 AND REF(DDZ,6)>0 AND REF(DDZ,7)>0 AND REF(DDZ,8)>0 AND REF(DDZ,9)>0,10,T9Z);
DRAWTEXT_FIX(1,0.24,0.90,0,STRCAT(STRCAT(' ',CON2STR(TZ,0)),' [天] ')),COLORYELLOW;