{SVZL - 主力持仓分析}
input:p1(7);
主力持仓:topview(1436,0,200),LINETHICK2;
bb1:=主力持仓-ref(主力持仓,1);
STICKLINE(bb1<0.2 and bb1>=0,bb1+主力持仓,主力持仓,0.1,0),colorred;
STICKLINE(bb1>=0.2 and bb1<1,bb1+主力持仓,主力持仓,1,0),colorred;
STICKLINE(bb1>=1 and bb1<2,bb1+主力持仓,主力持仓,2,0),colorred;
STICKLINE(bb1>=2,bb1+主力持仓,主力持仓,3,0),colorred;
STICKLINE(bb1>-0.2 and bb1<0,主力持仓+bb1,主力持仓,0.1,0),COLORCYAN;
STICKLINE(bb1<=-0.2 and bb1>-1,主力持仓+bb1,主力持仓,1,0),COLORCYAN;
STICKLINE(bb1<=-1 and bb1>-2,主力持仓+bb1,主力持仓,2,0),COLORCYAN;
STICKLINE(bb1<=-2,主力持仓+bb1,主力持仓,3,0),COLORCYAN;
多日净值:=主力持仓-ref(主力持仓,p1);
drawmovetext(多日净值>0,NUMTOSTR(p1)+'日内买卖净占比'+NUMTOSTR(多日净值)+'%'),colorred;
drawmovetext(多日净值<=0,NUMTOSTR(p1)+'日内买卖净占比'+NUMTOSTR(-多日净值)+'%'),colorgreen;
drawflagtext(bb1>0.2,主力持仓+bb1,'当日主力净买入占流通盘的'+NUMTOSTR(intpart(bb1*100)/100)+'%'),colorred;
drawflagtext(bb1<=-0.2,主力持仓+bb1,'当日主力净卖出占流通盘的'+NUMTOSTR(intpart(-bb1*100)/100)+'%'),colorgreen;
DRAWGBK((topview(1400,0,10)-ref(topview(1400,0,10),1))<>0 and STRCMP(STKLABEL,'000001')<>0 and capital<>0),COLOR484848;
drawmovetext((topview(1400,0,10)-ref(topview(1400,0,10),1))>0,'流通A股增加了'+NUMTOSTR((topview(1400,0,10)-ref(topview(1400,0,10),1))/10000)+'万股'),coloryellow;
drawmovetext((topview(1400,0,10)-ref(topview(1400,0,10),1))<0,'流通A股减少了'+NUMTOSTR((ref(topview(1400,0,10),1)-topview(1400,0,10))/10000)+'万股'),coloryellow;
drawtextabs(0,0,'超赢主力持仓'),coloryellow;