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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]有关均价线的模型AAA

   

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


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

主题:[求助]有关均价线的模型AAA

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 13:20:19    Post IP:58.246.57.26[显示全部帖子]

有关问题在原来的帖子回复,不要再发帖了


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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 14:23:12    Post IP:58.246.57.26[显示全部帖子]

dm:=4*-INTPART(LOG(C));
n1:=barslast(DATE<>REF(DATE,1))+1;

均线:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),dm),COLORYELLOW;

if close>均线 then begin

  sellshort(1,0,market);

  buy(holding=0,1,market);

end

 

if close<均线 then begin

  sell(1,0,market);

  buyshort(holding=0,1,market);

end

 

if openprofit<=-12*mindiff*multiplier then begin

   sellshort(1,0,market);

   sell(1,0,market);

end


if c>=enterprice+4*mindiff and c<=enterprice+9*mindiff and c<=hhv(h,enterbars+1)-mindiff then sell(1,0,market);

if c>=enterprice+10*mindiff and c<=enterprice+14*mindiff and c<=hhv(h,enterbars+1)-3*mindiff then sell(1,0,market);

if c>=enterprice+15*mindiff and c<=enterprice+19*mindiff and c<=hhv(h,enterbars+1)-8*mindiff then sell(1,0,market);

if c>=enterprice+20*mindiff and c<=enterprice+22*mindiff and c<=hhv(h,enterbars+1)-18*mindiff then sell(1,0,market);

if c<=enterprice-4*mindiff and c>=enterprice-9*mindiff and c>=llv(l,enterbars+1)+mindiff then sellshort(1,0,market);

if c<=enterprice-10*mindiff and c>=enterprice-14*mindiff and c>=llv(l,enterbars+1)+3*mindiff then sellshort(1,0,market);

if c<=enterprice-15*mindiff and c>=enterprice-19*mindiff and c>=llv(l,enterbars+1)+8*mindiff then sellshort(1,0,market);

if c<=enterprice-20*mindiff and c>=enterprice-22*mindiff and c>=llv(l,enterbars+1)+18*mindiff then sellshort(1,0,market);
if hhv(h,enterbars+1)>=enterprice+23*mindiff and close<=hhv(h,enterbars+1)-3*mindiff then sell(1,0,market);

if llv(l,enterbars+1)<=enterprice-23*mindiff and close>=llv(l,enterbars+1)+3*mindiff then sellshort(1,0,market);



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 15:07:17    Post IP:58.246.57.26[显示全部帖子]

上面的就是分时均价线


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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 15:39:58    Post IP:58.246.57.26[显示全部帖子]

而4楼的程序为什么还在价格远远超过分时均价线之上还有多次开仓。应该是如果超过分时均价线后收盘价没有再跌回均价线之下仅有一次在收盘价超过分时均价线开仓,没有再次开仓的。

 

 

这个就是过滤原则的解释吗?



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 15:44:44    Post IP:58.246.57.26[显示全部帖子]

前面的代码做如下修改:

variable:bj=0;
dm:=4*-INTPART(LOG(C));
n1:=todaybar;

均线:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),dm),COLORYELLOW;

if close>均线 then begin

  sellshort(1,0,market);

  buy(holding=0 and bj=1,1,market);
  bj:=2;
end

 

if close<均线 then begin

  sell(1,0,market);

  buyshort(holding=0 and bj=2,1,market);
  bj:=1;
end



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 16:47:35    Post IP:58.246.57.26[显示全部帖子]

如果希望同一根k线不开平仓,希望在原来的需求里面就讲清楚


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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 16:52:24    Post IP:58.246.57.26[显示全部帖子]

这样需要在所有的平仓条件里面加上 enterbars>0



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 16:54:51    Post IP:58.246.57.26[显示全部帖子]

variable:bj=0;
dm:=4*-INTPART(LOG(C));
n1:=todaybar;

均线:ROUNDS(IF(sum(vol,n1)=0,C,sum(C*vol,n1)/sum(vol,n1)),dm),COLORYELLOW;

if close>均线 then begin

  sellshort(1,0,market);

  buy(holding=0 and bj=1,1,market);
  bj:=2;
end

 

if close<均线 then begin

  sell(1,0,market);

  buyshort(holding=0 and bj=2,1,market);
  bj:=1;
end

 

if openprofit<=-12*mindiff*multiplier  and enterbars>0 then begin

   sellshort(1,0,market);

   sell(1,0,market);

end

if c>=enterprice+4*mindiff and c<=enterprice+9*mindiff and c<=hhv(h,enterbars+1)-mindiff  and enterbars>0 then sell(1,0,market);

if c>=enterprice+10*mindiff and c<=enterprice+14*mindiff and c<=hhv(h,enterbars+1)-3*mindiff  and enterbars>0 then sell(1,0,market);

if c>=enterprice+15*mindiff and c<=enterprice+19*mindiff and c<=hhv(h,enterbars+1)-8*mindiff and enterbars>0 then sell(1,0,market);

if c>=enterprice+20*mindiff and c<=enterprice+22*mindiff and c<=hhv(h,enterbars+1)-18*mindiff  and enterbars>0 then sell(1,0,market);

if c<=enterprice-4*mindiff and c>=enterprice-9*mindiff and c>=llv(l,enterbars+1)+mindiff  and enterbars>0 then sellshort(1,0,market);

if c<=enterprice-10*mindiff and c>=enterprice-14*mindiff and c>=llv(l,enterbars+1)+3*mindiff and enterbars>0 then sellshort(1,0,market);

if c<=enterprice-15*mindiff and c>=enterprice-19*mindiff and c>=llv(l,enterbars+1)+8*mindiff  and enterbars>0 then sellshort(1,0,market);

if c<=enterprice-20*mindiff and c>=enterprice-22*mindiff and c>=llv(l,enterbars+1)+18*mindiff  and enterbars>0 then sellshort(1,0,market);
if hhv(h,enterbars+1)>=enterprice+23*mindiff and close<=hhv(h,enterbars+1)-3*mindiff  and enterbars>0 then sell(1,0,market);

if llv(l,enterbars+1)<=enterprice-23*mindiff and close>=llv(l,enterbars+1)+3*mindiff  and enterbars>0 then sellshort(1,0,market);



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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/28 17:19:52    Post IP:58.246.57.26[显示全部帖子]

需要把上面所有的market改成thisclose,交易使用走完k线下单模式

[此贴子已经被作者于2015/12/28 17:20:02编辑过]


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

客户服务部

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

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

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2015/12/29 8:46:32    Post IP:58.246.57.26[显示全部帖子]

很多的白色箭头,这是改错了,贴代码


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

客户服务部

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

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

 回到顶部
总数 11 1 2 下一页