涨幅引用xx
hh:high;ll:low;cc:close;
a0:dynainfo(14)*100;
dd:date;
zdf:(cc/ref(cc,1)-1)*100;
hsh:vol/if(capital>0,capital,sum(vol,120))*100;
领涨板块及个股排序
input:x(1,1,3);
rq:=date;//取日期
a:=blkname;
hy:=if(strfind(a,1)>0,strleft(a,strfind(a,1)-1),a);//drawtext(barpos=sysparam(2),2,hy);
hys:=stkcount(hy);
dyzb:=if(x=1,涨幅引用xx.zdf,if(x=2,涨幅引用xx.hsh,涨幅引用xx.cc));
das:=datacount;
d0:=rq[das];//取最后日期
variable:dm[hys]=,vcp[hys]=0,vci[hys]=0,tp=0;
for k=1 to hys dobegin
ddd:=stkfromblk(hy,k);
dm[k]:=ddd;
tmp:=stkindi(ddd,dyzb,0,6);
tmpd:=stkindi(ddd,涨幅引用xx.dd,0,6);
vcp[k]:=tmp[das];
vci[k]:=if(tmpd[das]=d0,tmp[das],-1000);//去除当天停牌股
tp:=tp+if(vci[k]=-1000,1,0);
end;
px1:=sortpos(vci,1,1,hys);
khys:=hys-tp,linethick;
bkxs:=当前股所属行业: +hy+ 包含个股数:+numtostr(hys,0);
zf:=if(x=3, 元, %);
lbs:=if(x=3,收盘价,if(x=1,涨跌幅,换手率));
drawtext(sysparam(2)=barpos,h,bkxs),colorafff,align4;
wz:=intpart((sysparam(3)-sysparam(2))/10);
hst:= \n\n;
kg:= ;
//
if khys<2 then exit;
col1:=hst+kg+ ①+stknameex(dm[vci[1]])+ +numtostr(vcp[vci[1]],2)+zf+
②+stknameex(dm[vci[2]])+ +numtostr(vcp[vci[2]],2)+zf+
if(khys>3, ③+stknameex(dm[vci[3]])+ +numtostr(vcp[vci[3]],2)+zf,)+
if(khys>4, ④+stknameex(dm[vci[4]])+ +numtostr(vcp[vci[4]],2)+zf+ ⑤+stknameex(dm[vci[5]])+ +numtostr(vcp[vci[5]],2)+zf+\n+kg
+ ⑥+stknameex(dm[vci[6]])+ +numtostr(vcp[vci[6]],2)+zf+ ⑦+stknameex(dm[vci[7]])+ +numtostr(vcp[vci[7]],2)+zf
+ ⑧+stknameex(dm[vci[8]])+ +numtostr(vcp[vci[8]],2)+zf+ ⑨+stknameex(dm[vci[9]])+ +numtostr(vcp[vci[9]],2)+zf
+ ⑩+stknameex(dm[vci[10]])+ +numtostr(vcp[vci[10]],2)+zf,);//领先股
col2:=hst+hst+kg+if(khys>6, ①+stknameex(dm[vci[khys]])+ +numtostr(vcp[vci[khys]],2)+zf+
②+stknameex(dm[vci[khys-1]])+ +numtostr(vcp[vci[khys-1]],2)+zf+
③+stknameex(dm[vci[khys-2]])+ +numtostr(vcp[vci[khys-2]],2)+zf+
④+stknameex(dm[vci[khys-3]])+ +numtostr(vcp[vci[khys-3]],2)+zf+
⑤+stknameex(dm[vci[khys-4]])+ +numtostr(vcp[vci[khys-4]],2)+zf+\n+kg+
⑥+stknameex(dm[vci[khys-5]])+ +numtostr(vcp[vci[khys-5]],2)+zf+
⑦+stknameex(dm[vci[khys-6]])+ +numtostr(vcp[vci[khys-6]],2)+zf+
⑧+stknameex(dm[vci[khys-7]])+ +numtostr(vcp[vci[khys-7]],2)+zf+
⑨+stknameex(dm[vci[khys-8]])+ +numtostr(vcp[vci[khys-8]],2)+zf+
⑩+stknameex(dm[vci[khys-9]])+ +numtostr(vcp[vci[khys-9]],2)+zf,);//滞后股
drawtext(barpos=sysparam(2),h,hst+领先股:),colorred,align4;
drawtext(barpos=sysparam(2),h,col1),colorred,align4;
drawtext(barpos=sysparam(2),h,hst+hst+hst+滞后股:),colorff00,align4;
drawtext(barpos=sysparam(2),h,hst+col2
+\n+*********************************************************************************************************************************),colorffff00,align4;
bk:=自选股; //可任意指定版块,板块内个股数需大于9个
stksum:=stkcount(bk);dcount:=datacount;yygs4:=涨幅引用xx.a0;
variable:dmstr[stksum]=,var_px[stksum]=0,var_indi[stksum]=0;
for k=1 to stksum do
begin
dn:=stkfromblk(bk,k);
dmstr[k]:=dn;
temp1:=stkindi(dn,yygs4,0,-1);
var_px[k]:=temp1[dcount];
var_indi[k]:=temp1[dcount];
end;
num1:=sortpos(var_indi,1,1,stksum);
dm_max1:=var_indi[1];dm_max2:=var_indi[2];dm_max3:=var_indi[3];dm_max4:=var_indi[4];
dm_max5:=var_indi[5];dm_max6:=var_indi[6];dm_max7:=var_indi[7];dm_max8:=var_indi[8];
max1:=var_px[dm_max1];max2:=var_px[dm_max2];max3:=var_px[dm_max3];
max4:=var_px[dm_max4];max5:=var_px[dm_max5];max6:=var_px[dm_max6];max7:=var_px[dm_max7];
max8:=var_px[dm_max8];
drawtext(barpos=sysparam(2),100,hst+hst+hst+hst+hst+hst+自选前排序%+[+stknameex(dmstr[dm_max1])++numtostr(max1,2)
+][+stknameex(dmstr[dm_max2])++numtostr(max2,2)
+][+stknameex(dmstr[dm_max3])++numtostr(max3,2)
+][+stknameex(dmstr[dm_max4])++numtostr(max4,2)
+][+stknameex(dmstr[dm_max5])++numtostr(max5,2)
+][+stknameex(dmstr[dm_max6])++numtostr(max6,2)
+][+stknameex(dmstr[dm_max7])++numtostr(max7,2)
+][+stknameex(dmstr[dm_max8])++numtostr(max8,2)
+]),colorff99ff,align4;
yygs5:=涨幅引用xx.a0;
variable:dmstr[stksum]=,var_px[stksum]=0,var_indi[stksum]=0;
for k=1 to stksum do
begin
dn:=stkfromblk(bk,k);
dmstr[k]:=dn;
temp1:=stkindi(dn,yygs5,0,-1);
var_px[k]:=temp1[dcount];
var_indi[k]:=temp1[dcount];
end;
num1:=sortpos(var_indi,0,1,stksum);
dm_max1:=var_indi[1];dm_max2:=var_indi[2];dm_max3:=var_indi[3];dm_max4:=var_indi[4];
dm_max5:=var_indi[5];dm_max6:=var_indi[6];dm_max7:=var_indi[7];dm_max8:=var_indi[8];
max1:=var_px[dm_max1];max2:=var_px[dm_max2];max3:=var_px[dm_max3];
max4:=var_px[dm_max4];max5:=var_px[dm_max5];max6:=var_px[dm_max6];max7:=var_px[dm_max7];
max8:=var_px[dm_max8];
drawtext(barpos=sysparam(2),h,hst+hst+hst+hst+hst+hst+hst+自选后排序%+[+stknameex(dmstr[dm_max1])++numtostr(max1,2)
+][+stknameex(dmstr[dm_max2])++numtostr(max2,2)
+][+stknameex(dmstr[dm_max3])++numtostr(max3,2)
+][+stknameex(dmstr[dm_max4])++numtostr(max4,2)
+][+stknameex(dmstr[dm_max5])++numtostr(max5,2)
+][+stknameex(dmstr[dm_max6])++numtostr(max6,2)
+][+stknameex(dmstr[dm_max7])++numtostr(max7,2)
+][+stknameex(dmstr[dm_max8])++numtostr(max8,2)
+]
+\n+===============================================================
==================================================================),colorffff,align4;
/////////////////////////////////////////////////////////////////////////
{板块指数个股前8}
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 thens:=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;
drawtext(barpos=sysparam(2),h,hst+hst+hst+hst+hst+hst+hst+hst+hst+zfname[1]+(+ numtostr(stkcount(zfname[1]),0)+ ) + numtostr(zfnumber[1],2) + %
+\n+zfname[2]+(+ numtostr(stkcount(zfname[2]),0)+ ) +numtostr(zfnumber[2],2) + %
+\n+zfname[3]+(+ numtostr(stkcount(zfname[3]),0)+ ) +numtostr(zfnumber[3],2) + %
+\n+zfname[4]+(+ numtostr(stkcount(zfname[4]),0)+ ) +numtostr(zfnumber[4],2) + %
+\n+zfname[5]+(+ numtostr(stkcount(zfname[5]),0)+ ) + numtostr(zfnumber[5],2) + %
+\n+zfname[6]+(+ numtostr(stkcount(zfname[6]),0)+ ) + numtostr(zfnumber[6],2) + %
+\n+zfname[7]+(+ numtostr(stkcount(zfname[7]),0)+ ) + numtostr(zfnumber[7],2) + %
+\n+zfname[8]+(+ numtostr(stkcount(zfname[8]),0)+ ) + numtostr(zfnumber[8],2) + %
+\n+zfname[9]+(+ numtostr(stkcount(zfname[9]),0)+ ) + numtostr(zfnumber[9],2) + %
+\n+zfname[10]+(+ numtostr(stkcount(zfname[10]),0)+ ) + numtostr(zfnumber[10],2) + %),color5050ff,align4;
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:=if(dynainfo2(8,ty1)>0,dynainfo2(14,ty1)*100,-10);
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;
drawtext(barpos=sysparam(2),h,hst+hst+hst+hst+hst+hst+hst+hst+hst+ +minzfstr[1]
+\n+ +minzfstr[2]
+\n+ +minzfstr[3]
+\n+ +minzfstr[4]
+\n+ +minzfstr[5]
+\n+ +minzfstr[6]
+\n+ +minzfstr[7]
+\n+ +minzfstr[8]
+\n+ +minzfstr[9]
+\n+ +minzfstr[10]),colorff00ff,align4;
上一指标公式:深坑挖金-主图公式 飞狐深坑指标 源码
下一指标公式:资金突破公式 飞狐资金指标 源码
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文领涨板块及个股排序公式 飞狐排序领涨板块指标 源码仅供学习研究。