x1:=140 ;
y1:=60; y2:=90;
BKNAME:=’板块指数’;
STKC:=stkcount(BKNAME);
variable:s=0,ZFSZ[STKC]=0,ZFNAME[10]=”,ZFNumber[10]=0;
for p=1 to stkc do begin
Ty1:=STKFROMBLK(BKNAME,p);
Ty2:=dynainfo2(14,ty1)*100;
ZFSZ[p]:=Ty2;
if Ty2>=0 then s:=s+1;
end
NWY:=sortpos(ZFSZ,0,1,stkc);
for p1 =1 to 10 do begin
ZFDM:=STKFROMBLK(BKNAME,ZFSZ[stkc-(p1-1)]);
Te:=stknameex(ZFDM);
ZFNAME[p1]:=strleft(te,strlen(te)-4);
ZFNumber[p1]:=dynainfo2(14,ZFDM)*100;
end;
drawtextex(1,1,x1,y1,ZFNAME[1]+'(‘+ numtostr(stkcount(ZFNAME[1]),0)+ ‘) ‘ + numtostr(ZFNumber[1],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2,ZFNAME[2]+'(‘+ numtostr(stkcount(ZFNAME[2]),0)+ ‘) ‘ + numtostr(ZFNumber[2],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*2,ZFNAME[3]+'(‘+ numtostr(stkcount(ZFNAME[3]),0)+ ‘) ‘ + numtostr(ZFNumber[3],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*3,ZFNAME[4]+'(‘+ numtostr(stkcount(ZFNAME[4]),0)+ ‘) ‘ + numtostr(ZFNumber[4],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*4,ZFNAME[5]+'(‘+ numtostr(stkcount(ZFNAME[5]),0)+ ‘) ‘ + numtostr(ZFNumber[5],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*5,ZFNAME[6]+'(‘+ numtostr(stkcount(ZFNAME[6]),0)+ ‘) ‘ + numtostr(ZFNumber[6],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*6,ZFNAME[7]+'(‘+ numtostr(stkcount(ZFNAME[7]),0)+ ‘) ‘ + numtostr(ZFNumber[7],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*7,ZFNAME[8]+'(‘+ numtostr(stkcount(ZFNAME[8]),0)+ ‘) ‘ + numtostr(ZFNumber[8],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*8,ZFNAME[9]+'(‘+ numtostr(stkcount(ZFNAME[9]),0)+ ‘) ‘ + numtostr(ZFNumber[9],2) + ‘ %’),color5050ff,align2;
drawtextex(1,1,x1,y1+y2*9,ZFNAME[10]+'(‘+ numtostr(stkcount(ZFNAME[10]),0)+ ‘) ‘ + numtostr(ZFNumber[10],2) + ‘ %’),color5050ff,align2;
variable:MinZFStr[10]=”;
paa:=0;
WHILE Paa<10 do begin
PAA:=Paa+1;
MinStkName:=ZFNAME[paa];
STKNum:=stkcount(MinStkName);
variable:ZF[STKNum]=0;
for p2=1 to stkNum do begin
Ty1:=STKFROMBLK(MinStkName,p2);
Ty2:=dynainfo2(14,ty1)*100;
ZF[p2]:=Ty2;
end
NWY:=sortpos(ZF,0,1,stkNum );
ub:=if(STKNum>=8,8,STKNum);
for p3 =1 to UB do begin
ZFDM:=STKFROMBLK(MinStkName,ZF[STKNum-(p3-1)]);
Te:=stknameex(ZFDM);
MinZFStr[paa]:=MinZFStr[paa] +'(‘+Te + numtostr(dynainfo2(14,ZFDM)*100,2) +’%’+’)’+ ‘ ‘;//
end;
end;
x4:=160;
drawtextex(1,1,x4,y1,MinZFStr[1]),color5050ff;
drawtextex(1,1,x4,y1+Y2,MinZFStr[2]),color5050ff;
drawtextex(1,1,x4,y1+Y2*2,MinZFStr[3]),color5050ff;
drawtextex(1,1,x4,y1+Y2*3,MinZFStr[4]),color5050ff;
drawtextex(1,1,x4,y1+Y2*4,MinZFStr[5]),color5050ff;
drawtextex(1,1,x4,y1+Y2*5,MinZFStr[6]),color5050ff;
drawtextex(1,1,x4,y1+Y2*6,MinZFStr[7]),color5050ff;
drawtextex(1,1,x4,y1+Y2*7,MinZFStr[8]),color5050ff;
drawtextex(1,1,x4,y1+Y2*8,MinZFStr[9]),color5050ff;
drawtextex(1,1,x4,y1+Y2*9,MinZFStr[10]),color5050ff;
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)