欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请版主等高手修改一下模型

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有3799人关注过本帖平板打印复制链接

主题:请版主等高手修改一下模型

帅哥哟,离线,有人找我吗?
kiiik
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:21 积分:128 威望:0 精华:0 注册:2012/9/24 22:45:36
请版主等高手修改一下模型  发帖心情 Post By:2012/11/2 20:02:41    Post IP:124.226.23.157[只看该作者]

初始200万资金 满仓交易 每次开仓自动检索可用开仓的资金,进行满仓交易。平仓自动满仓反手,加载在个个周期都是一样的。都要满仓交易。

hi:=ref(hhv(h,20),1);
lo:=ref(llv(l,20),1);
entertime:=time<=144500;
exittime:=time>=145700;
buycond:=c>hi;
sellcond:=c<lo;
if holding>0 and (sellcond or exittime) then sell(1,1,market),orderqueue;
if holding<0 and (buycond or exittime) then sellshort(1,1,market),orderqueue;
if holding=0 and entertime and buycond then buy(1,1,market),orderqueue;
if holding=0 and entertime and sellcond then buyshort(1,1,market),orderqueue;

 


 回到顶部