飞狐的版块排序前八名个股源码

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;
 



来函数检测结果如下:
该公式没有未来函数

解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  股票指标网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 粤ICP备2023063687号-2 股票指标网别名指标网仅为互联网文章,所有股票指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。股票指标网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图