通达信分时主图叠加分类持仓公式
分时主图叠加分类持仓(5.0版本适用)
M0:=成交量.净流入#DAY;
M1:=成交量.超大单#DAY;
M2:=成交量.大单#DAY;
M3:=成交量.中单#DAY;
M4:=成交量.小单#DAY;
MAXV:=成交量.DAZHI#DAY;
DRAWRECTREL(1000,CONST(950-(ABS(M4)*500/MAXV)),960,970,IF(CONST(M4)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(955,CONST(950-(ABS(M3)*500/MAXV)),915,970,IF(CONST(M3)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(910,CONST(950-(ABS(M2)*500/MAXV)),870,970,IF(CONST(M2)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(865,CONST(950-(ABS(M1)*500/MAXV)),825,970,IF(CONST(M1)>0,RGB(100,0,0),RGB(0,50,0)));
DRAWRECTREL(820,CONST(950-(ABS(M0)*500/MAXV)),780,970,IF(CONST(M0)>0,RGB(120,0,120),RGB(0,100,100)));
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.974,1,0,'散户'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.928,1,0,'中户'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.882,1,0,'大户'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.833,1,0,'超大单'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.789,1,0,'净流入'),COLORRED;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.789,0.95,0,INTPART(M0)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.834,0.95,0,INTPART(M1)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.882,0.95,0,INTPART(M2)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.926,0.95,0,INTPART(M3)),COLORWHITE;
DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.972,0.95,0,INTPART(M4)),COLORWHITE;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.726,0.95,0,'今日分类持仓'),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.728,1,0,'单位(万元)'),COLORYELLOW;