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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]为什么以上代码不执行平多信号??

   

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


  共有4130人关注过本帖树形打印复制链接

主题:[求助]为什么以上代码不执行平多信号??

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


加好友 发短信
等级:新手上路 帖子:46 积分:655 威望:0 精华:0 注册:2012/5/15 20:57:57
[求助]为什么以上代码不执行平多信号??  发帖心情 Post By:2012/5/29 18:57:13    Post IP:122.95.65.242[只看该作者]


If c>ma(close,60) and ma(close,60)>REF(MA(C,60),1) then
 
 begin
 
Sellshort(holding<0,holding,thisclose);
 

Buy(holding=0,thisclose);
 

End
if enterprice<c then
begin
Sell(holding>0,holding,market)
end

 

为什么以上代码不执行平多信号??那个地方出错了?

 

请高手解释一下


 回到顶部
帅哥哟,离线,有人找我吗?
myhcow
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:108 积分:433 威望:0 精华:0 注册:2012/3/22 14:42:31
  发帖心情 Post By:2012/5/29 19:28:50    Post IP:183.144.249.42[只看该作者]

if enterprice<c then 
begin
Sell(holding>0,holding,market)
end
这是止损信号?enterprice>c 
你知道不知道自己写的是什么意思?


If c>ma(close,60) and ma(close,60)>REF(MA(C,60),1) then 
 
 begin
 
Sellshort(holding<0,holding,thisclose); 平空
 

Buy(holding=0,thisclose);  开多
 

End


if enterprice>c  then 止损
begin
Sell(holding>0,holding,market)
end


应该还有平多开空的语句


 回到顶部
帅哥哟,离线,有人找我吗?
zk7777777
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:46 积分:655 威望:0 精华:0 注册:2012/5/15 20:57:57
  发帖心情 Post By:2012/5/29 22:11:23    Post IP:122.95.65.242[只看该作者]

这是止损信号?enterprice>c 
你知道不知道自己写的是什么意思?

 

 

这个语句不对吗?我是想表现 当前为开多, 开仓价>当前收盘价(enterprice>c)为止损这个不对吗?


 回到顶部
帅哥哟,离线,有人找我吗?
myhcow
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:108 积分:433 威望:0 精华:0 注册:2012/3/22 14:42:31
  发帖心情 Post By:2012/5/29 22:32:54    Post IP:183.144.249.42[只看该作者]

if enterprice<c then 
begin
Sell(holding>0,holding,market)
end

你的源代码,写反了

 回到顶部