IF STRCMP(STRLEFT(STKLABEL,2),'00')=0 THEN BEGIN
DRAWTEXT(BARPOS=SYSPARAM(2),20,'只对上海股票有效');
EXIT;
END;
PREF:=(MA(CLOSE,3)+MA(CLOSE,5)+MA(CLOSE,10)+CLOSE)*0.25;
流通股数:=CAPITAL*100;
K1:=SELFDATA('1K');
K1户数:=SELFDATA('1K户数');
W1:=SELFDATA('1W');
W1户数:=SELFDATA('1W户数');
W5:=SELFDATA('5W');
W5户数:=SELFDATA('5W户数');
W10:=SELFDATA('10W');
W10户数:=SELFDATA('10W户数');
W50:=SELFDATA('50W');
W50户数:=SELFDATA('50W户数');
W100:=SELFDATA('100W');
W100户数:=SELFDATA('100W户数');
W500:=SELFDATA('500W');
W500户数:=SELFDATA('500W户数');
W1000:=SELFDATA('1000W');
W1000户数:=SELFDATA('1000W户数');
W1000P:=SELFDATA('1000+W');
W1000P户数:=SELFDATA('1000+W户数');
中散比1:=IF(PREF>100,MAX(0,4*(1-LOG(PREF)+2.01)),IF(PREF>10,MAX(0,5*(1-LOG(PREF)+2.01)),MAX(0,5*(1-LOG(PREF)+2.01))/(LOG(PREF)*LOG(PREF)+0.0001)));
中散比2:=IF(PREF>100,MAX(0,1.5*(1-LOG(PREF)+2.01)),IF(PREF>30,MAX(0,2*(1-LOG(PREF)+2.01)),IF(PREF>10,MAX(0,2.5*(1-LOG(PREF)+2.01)),MAX(0,2.5*(1-LOG(PREF)+2.01))/(LOG(PREF)*LOG(PREF)+0.0001))));
中散比3:=IF(PREF>10,MAX(0,0.8*(1-LOG(PREF)+2.01)),MAX(0,0.8*(1-LOG(PREF)+2.01))/(LOG(PREF)*LOG(PREF)+0.0001));
中散1:=K1+W1+MIN(W5,中散比1)+MIN(W10,中散比2)+MIN(W50,中散比3);
中散户数:=K1户数+W1户数+ROUND(W5户数*MIN(W5,中散比1)/W5)+ROUND(W10户数*MIN(W10,中散比2)/W10)+ROUND(W50户数*MIN(W50,中散比3)/W50);
K1Z:=K1-REF(K1,1);
W1Z:=W1-REF(W1,1);
W5Z:=W5-REF(W5,1);
W10Z:=W10-REF(W10,1);
W50Z:=W50-REF(W50,1);
W100Z:=W100-REF(W100,1);
W500Z:=W500-REF(W500,1);
W1000Z:=W1000-REF(W1000,1);
W1000PZ:=W1000P-REF(W1000P,1);
机构数:=SELFDATA('券基户数');
机构1:=SELFDATA('券基');
法人数:=SELFDATA('法人户数');
法人1:=SELFDATA('法人');
普通户数:=SELFDATA('普通户数');
普通1:=SELFDATA('普通');
私暮1:=100-机构1-法人1-中散1;
私暮户数:=普通户数-中散户数;
私暮:私暮1,LINETHICK0,PRECISION1,colorFF;
ZZ:=私暮1-REF(私暮1,1);
ZZ5:=私暮1-REF(私暮1,5);
△D5%:ZZ5,LINETHICK0,PRECISION2,colorFF;
机构:机构1,LINETHICK0,PRECISION1,colorFF00FF;
FZ:=机构1-REF(机构1,1);
FZ5:=机构1-REF(机构1,5);
ΔD5%:FZ5,LINETHICK0,PRECISION2,colorFF00FF;
法人:法人1,LINETHICK0,PRECISION1,colorFFFF;
OZ:=法人1-REF(法人1,1);
中散:中散1,LINETHICK0,PRECISION1,colorFF0000;
DZ:=中散1-REF(中散1,1);
DZ5:=中散1-REF(中散1,5);
▲D5%:DZ5,LINETHICK0,PRECISION2,colorFF0000;
普通:普通1,LINETHICK0,PRECISION1,colorFF00;
SZ:=普通1-REF(普通1,1);
SZ5:=普通1-REF(普通1,5);
D5Δ%:SZ5,LINETHICK0,PRECISION2,colorFF00;
帐户数:SELFDATA('总户数'),LINETHICK0,colorFFFF00;
UPINDEX:=MAX(LBOUND(机构)+1,SYSPARAM(1));
STICKLINE(BARPOS=DATACOUNT-3,0,机构[UPINDEX],48,0),colorFF00FF;
DRAWTEXT(BARPOS=DATACOUNT-3,机构[UPINDEX],NUMTOSTR(FZ[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(机构[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorFFC080;
DRAWTEXT(BARPOS=DATACOUNT-3,-3,'机构\n'+NUMTOSTR(机构数[SYSPARAM(1)],0)),ALIGN0,colorFF00FF;
STICKLINE(BARPOS=DATACOUNT-9,0,法人[UPINDEX],48,0),colorFFFF;
DRAWTEXT(BARPOS=DATACOUNT-9,法人[UPINDEX],NUMTOSTR(OZ[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(法人[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorFFC080;
DRAWTEXT(BARPOS=DATACOUNT-9,-3,'法人\n'+NUMTOSTR(法人数[SYSPARAM(1)],0)),ALIGN0,colorFFFF;
STICKLINE(BARPOS=DATACOUNT-15,0,私暮[UPINDEX],48,0),colorFF;
DRAWTEXT(BARPOS=DATACOUNT-15,私暮[UPINDEX],NUMTOSTR(ZZ[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(私暮[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorC060FF;
DRAWTEXT(BARPOS=DATACOUNT-15,-3,'私暮\n'+NUMTOSTR(私暮户数[SYSPARAM(1)],0)),ALIGN0,colorFF;
STICKLINE(BARPOS=DATACOUNT-21,0,中散[UPINDEX],48,0),colorFF0000;
DRAWTEXT(BARPOS=DATACOUNT-21,中散[UPINDEX],NUMTOSTR(DZ[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(中散[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorFFC080;
DRAWTEXT(BARPOS=DATACOUNT-21,-3,'中散'),ALIGN0,colorFF0000;
STICKLINE(BARPOS=DATACOUNT-27,0,普通[UPINDEX],48,0),colorFF00;
DRAWTEXT(BARPOS=DATACOUNT-27,普通[UPINDEX],NUMTOSTR(SZ[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(普通[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorC060FF;
DRAWTEXT(BARPOS=DATACOUNT-27,-3,'普通\n'+NUMTOSTR(普通户数[SYSPARAM(1)],0)),ALIGN0,colorFF00;
STICKLINE(BARPOS=DATACOUNT-31,-30,MAX(普通,机构)+20,8,0),color808080;
STICKLINE(BARPOS=DATACOUNT-35,0,K1[UPINDEX],48,0),colorD0D0EE;
DRAWTEXT(BARPOS=DATACOUNT-35,K1[UPINDEX],NUMTOSTR(K1Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(K1[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorD0D0EE;
DRAWTEXT(BARPOS=DATACOUNT-35,-2,'1K\n'+NUMTOSTR(K1户数[SYSPARAM(1)],0)),ALIGN0,colorD0D0EE;
STICKLINE(BARPOS=DATACOUNT-41,0,W1[UPINDEX],48,0),colorB0B0EE;
DRAWTEXT(BARPOS=DATACOUNT-41,W1[UPINDEX],NUMTOSTR(W1Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W1[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorB0B0EE;
DRAWTEXT(BARPOS=DATACOUNT-41,-2,NUMTOSTR(W1户数[SYSPARAM(1)],0)+'\n1W'),ALIGN0,colorB0B0EE;
STICKLINE(BARPOS=DATACOUNT-47,0,W5[UPINDEX],48,0),color9090EE;
DRAWTEXT(BARPOS=DATACOUNT-47,W5[UPINDEX],NUMTOSTR(W5Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W5[SYSPARAM(1)],2)),ALIGN0,PXUP48,color9090EE;
DRAWTEXT(BARPOS=DATACOUNT-47,-2,'5W\n'+NUMTOSTR(W5户数[SYSPARAM(1)],0)),ALIGN0,color9090EE;
STICKLINE(BARPOS=DATACOUNT-53,0,W10[UPINDEX],48,0),colorD0EED0;
DRAWTEXT(BARPOS=DATACOUNT-53,W10[UPINDEX],NUMTOSTR(W10Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W10[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorD0EED0;
DRAWTEXT(BARPOS=DATACOUNT-53,-2,'10W\n'+NUMTOSTR(W10户数[SYSPARAM(1)],0)),ALIGN0,colorD0EED0;
STICKLINE(BARPOS=DATACOUNT-59,0,W50[UPINDEX],48,0),colorB0EEB0;
DRAWTEXT(BARPOS=DATACOUNT-59,W50[UPINDEX],NUMTOSTR(W50Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W50[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorB0EEB0;
DRAWTEXT(BARPOS=DATACOUNT-59,-2,'50W\n'+NUMTOSTR(W50户数[SYSPARAM(1)],0)),ALIGN0,colorB0EEB0;
STICKLINE(BARPOS=DATACOUNT-65,0,W100[UPINDEX],48,0),color90EE90;
DRAWTEXT(BARPOS=DATACOUNT-65,W100[UPINDEX],NUMTOSTR(W100Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W100[SYSPARAM(1)],2)),ALIGN0,PXUP48,color90EE90;
DRAWTEXT(BARPOS=DATACOUNT-65,-2,'100W\n'+NUMTOSTR(W100户数[SYSPARAM(1)],0)),ALIGN0,color90EE90;
STICKLINE(BARPOS=DATACOUNT-71,0,W500[UPINDEX],48,0),colorEED0D0;
DRAWTEXT(BARPOS=DATACOUNT-71,W500[UPINDEX],NUMTOSTR(W500Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W500[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorEED0D0;
DRAWTEXT(BARPOS=DATACOUNT-71,-2,'500W\n'+NUMTOSTR(W500户数[SYSPARAM(1)],0)),ALIGN0,colorEED0D0;
STICKLINE(BARPOS=DATACOUNT-79,0,W1000[UPINDEX],48,0),colorEEB0B0;
DRAWTEXT(BARPOS=DATACOUNT-79,W1000[UPINDEX],NUMTOSTR(W1000Z[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W1000[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorEEB0B0;
DRAWTEXT(BARPOS=DATACOUNT-79,-2,'1000W\n'+NUMTOSTR(W1000户数[SYSPARAM(1)],0)),ALIGN0,colorEEB0B0;
STICKLINE(BARPOS=DATACOUNT-87,0,W1000P[UPINDEX],48,0),colorEE9090;
DRAWTEXT(BARPOS=DATACOUNT-87,W1000P[UPINDEX],NUMTOSTR(W1000PZ[SYSPARAM(1)],2)+'%\n'+NUMTOSTR(W1000P[SYSPARAM(1)],2)),ALIGN0,PXUP48,colorEEEEFF;
DRAWTEXT(BARPOS=DATACOUNT-87,-2,'1000+W\n'+NUMTOSTR(W1000P户数[SYSPARAM(1)],0)),ALIGN0,colorEE9090;
PARTLINE(1,机构),colorFF00FF;
PARTLINE(1,私暮),colorFF;
PARTLINE(1,中散),colorFF0000;
选私暮1:=私暮-LLV(私暮,30)>6 AND 私暮>35 AND MA(CLOSE,3)<1.35*REF(MA(CLOSE,3),20) AND MA(CLOSE,3)<1.5*LLV(MA(CLOSE,3),60) AND COUNT(私暮>REF(私暮,1),10)>6 AND 私暮>REF(私暮,13);
选机构1:=机构-LLV(机构,30)>10 AND 机构>40 AND MA(CLOSE,3)<1.45*REF(MA(CLOSE,3),20) |