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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 收盘时开仓

   

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


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

主题:收盘时开仓

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


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

老师可不可以解释一下这个代码做过标注if c1 and c3 and c4 and (( timetot0(dynainfo(207))>=time0-2) or not(islastbar)) and holding=0 and ((yl<=0) or barslast(cross(yl,0.5))>3) then begin
 buy(holding=0,1,thisclose);

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


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

yl这个全局变量,在没有开平仓时为0,盈利时为1,亏损时为-1.这样就可以在小于0时直接开仓,而大于1时就需要过3个k线后再开仓


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

客户服务部

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

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

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


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

为什么我这样写不行
variable:n=0;
c1:=isup and ref(isup,1);
c2:=isdown and ref(isdown,1);
c3:=all(vol>=a,2);
c4:=time>091500 and time<162500;
if c1 and c3 and c4 and (( timetot0(dynainfo(207))>=time0-2) or not(islastbar)) and n=0 and holding=0 then begin
 n:=1;
buy(holding=0,1,thisclose);
end
if c1 and c3 and c4 and (( timetot0(dynainfo(207))>=time0-2) or not(islastbar)) and n=1 and holding=0 and barslast( h-enterprice>=d or enterprice-l>=d )>3 then begin
 n:=1;
buy(holding=0,1,thisclose);
end
if holding>0 and enterprice-l>=b then sell(1,0,thisclose);
if holding>0 and hhv(h,enterbars+1)>enterprice+30 and c<enterprice then sell(1,0,thisclose);
if holding>0 and h-enterprice>=d then sell(1,0,thisclose);
if c2 and c3 and c4 and (( timetot0(dynainfo(207))>=time0-2) or not(islastbar)) and n=0 and holding=0 then begin
n:=1;
buyshort(holding=0,1,thisclose);
end
if c2 and c3 and c4 and (( timetot0(dynainfo(207))>=time0-2) or not(islastbar)) and n=1 and holding=0 and barslast( h-enterprice>=d or enterprice-l>=d )>3 then begin
n:=1;
buyshort(holding=0,1,thisclose);
end
if holding<0 and h-enterprice>=b then sellshort(1,0,thisclose);
if holding<0 and llv(l,enterbars+1)<enterprice-30 and c>enterprice then sellshort(1,0,thisclose);
if holding<0 and enterprice-l>=d then sellshort(1,0,thisclose);

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


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

请老师帮忙说明一下原因。

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


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

不能确定多头止盈后一定开多,空头止盈后一定开空


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

客户服务部

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

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

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


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

老师,那在我写的代码的基础上应该怎么修改。

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


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

不好改


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

客户服务部

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

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

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


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

辛苦老师了,帮帮忙

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


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

我主要是为了提高函数的使用水平,对金字塔的编程使用有更深的认识。

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


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

这个不改了,用新的代码


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

客户服务部

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

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

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