公式网 股票指标公式源码分享 登录 注册
公式指标平网
未来函数检测
首页 金钻指标 通达信公式 大智慧公式 同花顺公式 文华财经公式 东财通公式 飞狐公式 操盘手公式 其他公式 公式解答 股票软件 股票池
当前位置:→ 公式网 > 飞狐公式 > 正文 → 正文

飞狐筹码指标筹码峰上显示数值

发布时间:2015/9/4 6:51:54  浏览次数:

编写要求:

 

公式在线网解答:

 网友求助:

公式名:筹码
主图指标
飞狐指标源码。
该指标来源于理想论坛,原贴已找不到了。
求助目的:将筹码峰上显示对应的数值。

公式源码:
a0:=BARSCOUNT(c);a3:=SYSPARAM(3);a2:=SYSPARAM(2);a4:=SYSPARAM(4);
a5:=SYSPARAM(5);nn0:=a3-a2;nn:=a0-a2;hh1:=(a4-a5)/10;
y0:=a0>=a2;vv0:=if(y0=1 and SYSPARAM(1)>=a0,v,0);
c1:=if(BETWEEN(c,a4-0*hh1,a4-1*hh1),vv0,0);
c2:=if(BETWEEN(c,a4-1*hh1,a4-2*hh1),vv0,0);
c3:=if(BETWEEN(c,a4-2*hh1,a4-3*hh1),vv0,0);
c4:=if(BETWEEN(c,a4-3*hh1,a4-4*hh1),vv0,0);
c5:=if(BETWEEN(c,a4-4*hh1,a4-5*hh1),vv0,0);
c6:=if(BETWEEN(c,a4-5*hh1,a4-6*hh1),vv0,0);
c7:=if(BETWEEN(c,a4-6*hh1,a4-7*hh1),vv0,0);
c8:=if(BETWEEN(c,a4-7*hh1,a4-8*hh1),vv0,0);
c9:=if(BETWEEN(c,a4-8*hh1,a4-9*hh1),vv0,0);
c10:=if(BETWEEN(c,a4-9*hh1,a4-10*hh1),vv0,0);
v1:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c1,nn0),0),2));
v2:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c2,nn0),0),2));
v3:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c3,nn0),0),2));
v4:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c4,nn0),0),2));
v5:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c5,nn0),0),2));
v6:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c6,nn0),0),2));
v7:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c7,nn0),0),2));
v8:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c8,nn0),0),2));
v9:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c9,nn0),0),2));
v10:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c10,nn0),0),2));
av0:=max(v1,max(v2,max(v3,max(v4,max(v5,max(v6,max(v7,max(v8,max(v9,v10)))))))));

x1:=v1/av0>=nn/nn0 and nn>=0;x2:=v2/av0>=nn/nn0 and nn>=0;
x3:=v3/av0>=nn/nn0 and nn>=0;x4:=v4/av0>=nn/nn0 and nn>=0;
x5:=v5/av0>=nn/nn0 and nn>=0;x6:=v6/av0>=nn/nn0 and nn>=0;
x7:=v7/av0>=nn/nn0 and nn>=0;x8:=v8/av0>=nn/nn0 and nn>=0;

FILLRGN(v1/av0>=nn/nn0 and nn>=0,a4-0*hh1,a4-1*hh1+0.05),colorgray;
FILLRGN(v2/av0>=nn/nn0 and nn>=0,a4-1*hh1,a4-2*hh1+0.05),colorgray;
FILLRGN(v3/av0>=nn/nn0 and nn>=0,a4-2*hh1,a4-3*hh1+0.05),colorgray;
FILLRGN(v4/av0>=nn/nn0 and nn>=0,a4-3*hh1,a4-4*hh1+0.05),colorgray;
FILLRGN(v5/av0>=nn/nn0 and nn>=0,a4-4*hh1,a4-5*hh1+0.05),colorgray;
FILLRGN(v6/av0>=nn/nn0 and nn>=0,a4-5*hh1,a4-6*hh1+0.05),colorgray;
FILLRGN(v7/av0>=nn/nn0 and nn>=0,a4-6*hh1,a4-7*hh1+0.05),colorgray;
FILLRGN(v8/av0>=nn/nn0 and nn>=0,a4-7*hh1,a4-8*hh1+0.05),colorgray;
FILLRGN(v9/av0>=nn/nn0 and nn>=0,a4-8*hh1,a4-9*hh1+0.05),colorgray;
FILLRGN(v10/av0>=nn/nn0 and nn>=0,a4-9*hh1,a4-10*hh1+0.05),colorgray;

KLINE(o,h,l,c,0);

下面的图例是另一个指标筹码峰指标的截图,希望老师们、高手们,帮我将上面源码公式的效果,改成下面一样。
 

飞狐筹码指标筹码峰上显示数值


解答如下:
a0:=BARSCOUNT(c);a3:=SYSPARAM(3);a2:=SYSPARAM(2);a4:=SYSPARAM(4);
a5:=SYSPARAM(5);nn0:=a3-a2;nn:a0-a2 linethick;hh1:=(a4-a5)/10;
y0:=a0>=a2;vv0:=if(y0=1 and SYSPARAM(1)>=a0,v,0);
c1:if(BETWEEN(c,a4-0*hh1,a4-1*hh1),vv0,0) linethick;
c2:=if(BETWEEN(c,a4-1*hh1,a4-2*hh1),vv0,0) linethick;
c3:=if(BETWEEN(c,a4-2*hh1,a4-3*hh1),vv0,0);
c4:if(BETWEEN(c,a4-3*hh1,a4-4*hh1),vv0,0)linethick;
c5:=if(BETWEEN(c,a4-4*hh1,a4-5*hh1),vv0,0);
c6:=if(BETWEEN(c,a4-5*hh1,a4-6*hh1),vv0,0);
c7:=if(BETWEEN(c,a4-6*hh1,a4-7*hh1),vv0,0);
c8:=if(BETWEEN(c,a4-7*hh1,a4-8*hh1),vv0,0);
c9:if(BETWEEN(c,a4-8*hh1,a4-9*hh1),vv0,0) linethick;
c10:=if(BETWEEN(c,a4-9*hh1,a4-10*hh1),vv0,0);
v1:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c1,nn0),0),2));
v2:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c2,nn0),0),2));
v3:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c3,nn0),0),2));
v4:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c4,nn0),0),2));
v5:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c5,nn0),0),2));
v6:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c6,nn0),0),2));
v7:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c7,nn0),0),2));
v8:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c8,nn0),0),2));
v9:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c9,nn0),0),2));
v10:=STRTONUM(NUMTOSTR(if(ISLASTBAR,sum(c10,nn0),0),2));
av0:=max(v1,max(v2,max(v3,max(v4,max(v5,max(v6,max(v7,max(v8,max(v9,v10)))))))));

x1:=v1/av0>=nn/nn0 and nn>=0;x2:=v2/av0>=nn/nn0 and nn>=0;
x3:=v3/av0>=nn/nn0 and nn>=0;x4:=v4/av0>=nn/nn0 and nn>=0;
x5:=v5/av0>=nn/nn0 and nn>=0;x6:=v6/av0>=nn/nn0 and nn>=0;
x7:=v7/av0>=nn/nn0 and nn>=0;x8:=v8/av0>=nn/nn0 and nn>=0;
x9:=v9/av0>=nn/nn0 and nn>=0;x10:=v10/av0>=nn/nn0 and nn>=0;
FILLRGN(v1/av0>=nn/nn0 and nn>=0,a4-0*hh1,a4-1*hh1+0.05),colorgray;
FILLRGN(v2/av0>=nn/nn0 and nn>=0,a4-1*hh1,a4-2*hh1+0.05),colorgray;
FILLRGN(v3/av0>=nn/nn0 and nn>=0,a4-2*hh1,a4-3*hh1+0.05),colorgray;
FILLRGN(v4/av0>=nn/nn0 and nn>=0,a4-3*hh1,a4-4*hh1+0.05),colorgray;
FILLRGN(v5/av0>=nn/nn0 and nn>=0,a4-4*hh1,a4-5*hh1+0.05),colorgray;
FILLRGN(v6/av0>=nn/nn0 and nn>=0,a4-5*hh1,a4-6*hh1+0.05),colorgray;
FILLRGN(v7/av0>=nn/nn0 and nn>=0,a4-6*hh1,a4-7*hh1+0.05),colorgray;
FILLRGN(v8/av0>=nn/nn0 and nn>=0,a4-7*hh1,a4-8*hh1+0.05),colorgray;
FILLRGN(v9/av0>=nn/nn0 and nn>=0,a4-8*hh1,a4-9*hh1+0.05),colorgray;
FILLRGN(v10/av0>=nn/nn0 and nn>=0,a4-9*hh1,a4-10*hh1+0.05),colorgray;

KLINE(o,h,l,c,0);
drawnumber(x1 and refx(x1,1)=0 or x1*islastbar,a4-0*hh1,a4-1*hh1+0.05,2),colorwhite;
drawnumber(x2 and refx(x2,1)=0 or x2*islastbar,a4-1*hh1,a4-2*hh1+0.05,2),colorwhite;
drawnumber(x3 and refx(x3,1)=0 or x3*islastbar,a4-2*hh1,a4-3*hh1+0.05,2),colorwhite;
drawnumber(x4 and refx(x4,1)=0 or x4*islastbar,a4-3*hh1,a4-4*hh1+0.05,2),colorwhite;
drawnumber(x5 and refx(x5,1)=0 or x5*islastbar,a4-4*hh1,a4-5*hh1+0.05,2),colorwhite;
drawnumber(x6 and refx(x6,1)=0 or x5*islastbar,a4-5*hh1,a4-6*hh1+0.05,2),colorwhite;
drawnumber(x7 and refx(x7,1)=0 or x6*islastbar,a4-6*hh1,a4-7*hh1+0.05,2),colorwhite;
drawnumber(x8 and refx(x8,1)=0 or x7*islastbar,a4-7*hh1,a4-8*hh1+0.05,2),colorwhite;
drawnumber(x9 and refx(x9,1)=0 or x8*islastbar,a4-8*hh1,a4-9*hh1+0.05,2),colorwhite;
drawnumber(x10 and refx(x10,1)=0 or x9*islastbar,a4-9*hh1,a4-10*hh1+0.05,2),colorwhite;
 

 

资源下载链接   资源大小:unknow

手机移动版 - 关于我们 - 联系我们 - 广告合作 - 下载声明 - 网站帮助 - 友情链接 - 网站地图 - TOP
湘ICP备09016573号-3 增值电信业务经营ICP许可证:湘B2-20210269 湘公网安备43108102000039号
Copyright © GSZX.COM.CN ,All Rights Reserved.
股票公式,股票指标,股票软件,股票知识