【财富游戏】实盘策略源码 发布 003[金字塔模型]

阅读 作者:股海网时间 2013-11-13 金字塔公式

金字塔公式 金字塔模型策略源码:
 
//------------------------------------------------------------------------
 // 简称: openrangbreak
 // 名称: 开盘区间突破策略
 //   by: 财富游戏
//------------------------------------------------------------------------
 

input:percentofrange(0.5,0,1,0.1);     //多头突破波动比例
 input:lots(1,0,9,1);
 
         highd:=callstock(stklabel,vthigh,6,-1);
         lowd:=callstock(stklabel,vtlow,6,-1);
         opend:=valuewhen(date<>ref(date,1),open);
        
        ranget:= highd-lowd;
         upperband: opend +percentofrange*ranget;
         lowerband: opend -percentofrange*ranget;
      
 
        if    (holding=0) then begin
                 if    (high>=upperband) then begin
                         buy(holding=0,lots,limitr,max(open,upperband));
                end
               
                if    (low<=lowerband) then begin
                         buyshort(holding=0,lots,limitr,min(open,lowerband));
                end
         end
 
        if    (holding<0)  then begin
                 if    (high>=upperband) then begin
                            sellshort(holding<0,lots,limitr,max(open,upperband));
                         buy(holding=0,lots,limitr,max(open,upperband));
                end
         end
 
  if    (holding>0)  then begin
                 if    (low<=lowerband) then begin
                         sell(holding>0,lots,limitr,min(open,lowerband));
                         buyshort(holding=0,lots,limitr,min(open,lowerband));
                 end
        end
 
持仓:holding,noaxis ,linethick0 ;
 盈亏:asset-1000000,noaxis,coloryellow,linethick2;
 
//1、range break 
 //波动区间突破交易,根据昨天波动幅度的一定百分比,来触发当日的趋势交易,
 //如果昨天的波动幅度是异常的,应当对该波动幅度进行必要的调整,以保持合理性。

 

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

问题反馈 取消