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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件金字塔软件问题提交 → [求助]

   

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


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

主题:[求助]

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


加好友 发短信
等级:新手上路 帖子:96 积分:489 威望:0 精华:0 注册:2011/9/5 19:34:19
[求助]  发帖心情 Post By:2011/9/22 15:38:58 [只看该作者]

 

if enlong then
  begin
  sellshort(holding<0,0,market);
  buy(holding<1,1,market);
  end
//开多
if enlongA then
  buy(holding=1,1,market);
//加多
if exlong then
  sell(holding>=1,0,market);
//平多

if enshort then
  begin
  sell(holding>0,0,market);
  buyshort(holding>-1,1,market);
  end
//开空
if enshortA then
  buyshort(holding=-1,1,market);
//加空
if exshort then
  sellshort(holding<=-1,0,market);
//平空

 

将上面一段代码的开仓数的1改为下面一段代码中7,就没有加仓信号出现了,为什么。

if enlong then
  begin
  sellshort(holding<0,0,market);
  buy(holding<1,7,market);
  end
//开多
if enlongA then
  buy(holding=7,7,market);
//加多
if exlong then
  sell(holding>=1,0,market);
//平多

if enshort then
  begin
  sell(holding>0,0,market);
  buyshort(holding>-1,7,market);
  end
//开空
if enshortA then
  buyshort(holding=-7,7,market);
//加空
if exshort then
  sellshort(holding<=-1,0,market);
//平空

 


 回到顶部