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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 关于代码 enterprice的问题

   

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


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

主题:关于代码 enterprice的问题

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 15:36:44    Post IP:218.106.146.122[只看该作者]

为什么我安装上面的代码,在测试的时候没有交易信号产生,是哪里出错了吗?

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 15:39:51    Post IP:218.106.146.122[只看该作者]

c8:=barslast( h>enterprice+d*mindiff or l<enterprice-d*mindiff)>10;
variable:n=0;
if c7 and ref(c6,1)and n=0 and holding=0 then buy(holding=0,1,market);
n:=1;
if c7 and ref(c6,1)and n=1 and holding=0 and c8 then buy(holding=0,1,market);
if L<ref(ref(llv(l,3),1),enterbars) or enterprice-l>=30 then sell(1,0,market);
if holding>0 and hhv(h,enterbars+1)>enterprice+30 and c<enterprice then sell(1,0,thisclose);
if h>enterprice+d*mindiff then sell(1,0,market);
if c7 and n=0 and holding=0 and ref(c9,1) then buyshort(holding=0,1,market);
n:=1;
if c7 and n=1 and holding=0 and c8 and ref(c9,1) then buyshort(holding=0,1,market);
if h>ref(ref(hhv(h,3),1),enterbars) or h-enterprice>=30 then sellshort(1,0,market);
if holding<0 and llv(l,enterbars+1)<enterprice-30 and c>enterprice then sellshort(1,0,thisclose);
if l<enterprice-d*mindiff then sellshort(1,0,market);
代码是这样的,老师帮忙检查一下有没有错误。

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/9/20 15:41:23    Post IP:180.169.30.6[只看该作者]

if c7 and ref(c6,1)and n=0 and holding=0 then  begin
buy(holding=0,1,market);
n:=1;
end
 
这句要这样写


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 15:43:41    Post IP:218.106.146.122[只看该作者]

是不是每句都有这么改

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 15:58:21    Post IP:218.106.146.122[只看该作者]

c8:=barslast( h>enterprice+d*mindiff or l<enterprice-d*mindiff)>10;
variable:n=0;
if c7 and ref(c6,1)and n=0 and holding=0 then begin buy(holding=0,1,market);
n:=1;
end
if c7 and ref(c6,1)and n=1 and holding=0 and c8 then begin buy(holding=0,1,market);
end
if L<ref(ref(llv(l,3),1),enterbars) or enterprice-l>=30 then sell(1,0,market);
if holding>0 and hhv(h,enterbars+1)>enterprice+30 and c<enterprice then sell(1,0,thisclose);
if h>enterprice+d*mindiff then sell(1,0,market);
if c7 and n=0 and holding=0 and ref(all(c<o,2) and c<ref(c,1) and any(o-c>a*mindiff,2) and all(c-l<a*mindiff,2) and all(vol>b,2),1) then begin buyshort(holding=0,1,market);
n:=1;
end
if c7 and n=1 and holding=0 and c8 and ref(all(c<o,2) and c<ref(c,1) and any(o-c>a*mindiff,2)  and all(c-l<a*mindiff,2) and all(vol>b,2),1) then begin buyshort(holding=0,1,market);
end
if h>ref(ref(hhv(h,3),1),enterbars) or h-enterprice>=30 then sellshort(1,0,market);
if holding<0 and llv(l,enterbars+1)<enterprice-30 and c>enterprice then sellshort(1,0,thisclose);
if l<enterprice-d*mindiff then sellshort(1,0,market);
改完是不是这样的。

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/9/20 16:39:11    Post IP:180.169.30.6[只看该作者]

是的,开仓的都这么改


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 16:52:27    Post IP:218.106.146.122[只看该作者]

为什么在做策略回测的时候出问题了,策略的报告不完整,历史数据我都全部补充完整了。

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/9/20 16:53:48    Post IP:116.226.229.171[只看该作者]

报告不完整是什么样的?


金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 16:54:09    Post IP:218.106.146.122[只看该作者]

但是如果我把c8:=barslast( h>enterprice+d*mindiff or l<enterprice-d*mindiff)>10;删除后,又都正常了。

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


加好友 发短信
等级:论坛游民 帖子:225 积分:0 威望:0 精华:0 注册:2016/8/9 10:55:14
  发帖心情 Post By:2016/9/20 16:59:53    Post IP:218.106.146.122[只看该作者]

中间时间的报告都没有
图片点击可在新窗口打开查看此主题相关图片如下:测试的时间.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:测试的交易明细.png
图片点击可在新窗口打开查看

 回到顶部
总数 110 1.. 上一页 2 3 4 5 6 7 8 9 10 11 下一页