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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 继续求助

   

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


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

主题:继续求助

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


加好友 发短信
等级:论坛游侠 帖子:415 积分:1791 威望:0 精华:0 注册:2009/11/20 21:02:10
  发帖心情 Post By:2009/11/20 23:16:56    Post IP:125.122.192.81[只看该作者]

{平多}
sell(holding>0 and sp,0,thisclose);   //测试时,需要跳变
Tsell(Tholding>0 and sp,0,lmt,c); //实战时,冒头就行,注意取值
{平空}
sellshort(holding<0 and bp,0,thisclose);
Tsellshort(Tholding<0 and bp,0,lmt,c);
{开多}
buy(holding=0 and  bk ,intpart(asset*0.4/close),thisclose);
Tbuy(Tholding=0 and bk,intpart(Tasset*0.1/close),lmt,c);
{开空}
buyshort( holding=0 and sk,intpart(asset*0.4/close),thisclose);
Tbuyshort(Tholding=0 and sk,intpart(Tasset*0.1/close),lmt,c);
 
资产_control:asset,COLORCYAN,noaxis;
//持仓:holding,noaxis;

 

这里的0是什么意思??开多开空时是按照资金的比率买入的呀!那么应该平全部仓位,缺省才对


 回到顶部
总数 13 1 2 下一页