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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 加仓后平一半仓位怎么写?

   

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


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

主题:加仓后平一半仓位怎么写?

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


加好友 发短信
等级:新手上路 帖子:67 积分:431 威望:0 精华:0 注册:2010/10/12 9:26:32
加仓后平一半仓位怎么写?  发帖心情 Post By:2011/8/7 23:11:02    Post IP:117.28.135.209[只看该作者]

请教老师,以下平一半仓位怎么写?

if ref(c,1)>=ref(o,1) and c<o and holding>o then begin

    (此处平一半仓位);

 

if ref(c,1)<ref(o,1) and c<o and holding>0 then begin

    sell(1,0,limitr,c);//------------此处平掉余下的仓位。

 

if c>o and holding=o then begin

    buy(1,1,limitr,c);

 

if c>o and holding=1 then begin

    buy(1,1,limitr,c);

 

if c>o and holding=2 then begin

    buy(1,1,limitr,c);

 

if c>o and holding=3 then begin

    buy(1,1,limitr,c);

 

if c>o and holding=4 then begin

    buy(1,1,limitr,c);

 

if c>o and holding=5 then begin

    buy(1,1,limitr,c);

 

if c>o and holding=6 then begin

    buy(1,1,limitr,c);

......

[此贴子已经被作者于2011-8-7 23:12:25编辑过]

 回到顶部