飞狐高仿指南针市场盈亏指标CYS13

阅读 作者:股海网时间 2012-07-19 飞狐公式

飞狐高仿指南针市场盈亏指标CYS13

在高仿指南针原版 成本均线 cyc 的基础上,改编了 高仿指南针市场盈亏指标CYS13  公式。
本公式 , 以图形(曲线)显示 cys13,以数值显示 cys5 、cys13、cys34 、cys∞ 。
稍加改动也可同时显示   cys5 、cys13、cys34 、cys∞ 4条曲线。
 


 ﹛ 高仿指南针市场盈亏   飞狐 附图公式 ﹜

 ﹛ cys  市场盈亏公式 ﹜

mid  := (o+c)/2;
hsl:=if(capital=0,v/sum(v,100),v/capital);
ljhs := hsl;
cyc1 := mid;
ljhs2:= hsl;
cyc2 := mid;
ljhs3:= hsl;
cyc3 := mid;
ljhsm:= hsl;
cycm := mid;

<%
vmid = ffl.vardata("mid")
vhsl = ffl.vardata("hsl")
vljhs = ffl.vardata("ljhs")
vljhs2 = ffl.vardata("ljhs2")
vljhs3 = ffl.vardata("ljhs3")
vljhsm = ffl.vardata("ljhsm")
vcyc1 = ffl.vardata("cyc1")
vcyc2 = ffl.vardata("cyc2")
vcyc3 = ffl.vardata("cyc3")
vcycm = ffl.vardata("cycm")

last=ubound(vmid)
for i=1 to last
   vljhs(i) = vljhs(i -1) * (1 - vhsl(i)) * 4 / 5 + vhsl(i)
        vcyc1(i) = (vmid(i) * vhsl(i) + vcyc1(i-1) * vljhs(i -1) * (1 - vhsl(i)) * 4 / 5) / vljhs(i)
   vljhs2(i) = vljhs2(i -1) * (1 - vhsl(i)) * 12 / 13 + vhsl(i)
        vcyc2(i) = (vmid(i) * vhsl(i) + vcyc2(i-1) * vljhs2(i -1) * (1 - vhsl(i)) * 12 / 13) / vljhs2(i)
   vljhs3(i) = vljhs3(i -1) * (1 - vhsl(i)) * 33 / 34 + vhsl(i)
        vcyc3(i) = (vmid(i) * vhsl(i) + vcyc3(i-1) * vljhs3(i -1) * (1 - vhsl(i)) * 33 / 34) / vljhs3(i)
   vljhsm(i) = vljhsm(i -1) * (1 - vhsl(i)) + vhsl(i)
        vcycm(i) = (vmid(i) * vhsl(i) + vcycm(i-1) * vljhsm(i -1) * (1 - vhsl(i))) / vljhsm(i)
next

ffl.vardata("ljhs") = vljhs
ffl.vardata("ljhs2") = vljhs2
ffl.vardata("ljhs3") = vljhs3
ffl.vardata("ljhsm") = vljhsm
ffl.vardata("cyc1") = vcyc1
ffl.vardata("cyc2") = vcyc2
ffl.vardata("cyc3") = vcyc3
ffl.vardata("cycm") = vcycm

%>
cyc5:cyc1,coloryellow;
cyc13:cyc2,COLORMAGENTA;
cyc34:cyc3,colorgreen;
cyc∞: cycm,COLORCYAN;

cys13:100*(CLOSE-cyc13)/cyc13;
cys5:100*(CLOSE-cyc5)/cyc5,LINETHICK0;
cys34:100*(CLOSE-cyc34)/cyc34,LINETHICK0;
cys∞: 100*(CLOSE- cyc∞)/ cyc∞,LINETHICK0;

5;
0;
-5;
-20;
 

收藏
全部看法共 0 条
上传会员: 
股海网
上传时间: 
2012-07-19
下载积分: 
-
免责申明: 
请仔细阅读并同意后才能下载
本附件为用户分享上传,股海网没有对文件进行验证,不能保证下载资源的准确性、安全性和完整性,也不保证下载资源能正常安装和使用,且下载后扣除的积分无法退还,除非您充分理解并完全接受本声明,否则您无权下载。
本站对提供下载的软件、指标、资料等不拥有任何权利,其版权归该下载资源的合法拥有者所有。本附件仅供学习和研究,不得用于商业或非法用途,如有侵犯您的版权,请参看 《侵权处理流程》《免责声明条款》
点击下载无反应时,更换手机自带浏览器重登录操作,如华为浏览器,苹果Safari浏览器,第三方浏览器有不兼容现象,或先收藏再到电脑端下载。
同意以上声明才能下载,扣除积分无法退还!
我已知晓! 点我同意 所有条款自愿下载!
如有问题请点关闭提交问题反馈→
关闭

问题反馈 取消