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


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

   

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


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

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

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


加好友 发短信
等级:论坛游民 帖子:122 积分:0 威望:0 精华:0 注册:2015/12/9 12:32:38
[求助]有关均价线的模型AAA  发帖心情 Post By:2015/12/28 11:33:06    Post IP:101.90.255.170[只看该作者]

有关均价线的模型



思路:

 

1、收盘价大于分时均价线价买入,收盘价小于分时均价线价卖出;

2、最大亏损12跳;

3、盈利4跳至9跳,如果回调至盈利1跳时平仓;盈利10跳至14跳,如果回调至盈利3跳时平仓;盈利15跳至19跳,如果回调至盈利8跳时平仓;盈利20跳至22跳,如果回调至盈利18跳时平仓;23跳以上跟踪止盈,则最新价从上一次高点回撤3跳,止赢;if c>=enterprice+4 and c<=enterprice+9 and cross(enterprice+1,c) then sell(1,0,market);

if c>=enterprice+10 and c<=enterprice+14 and cross(enterprice+3,c) then sell(1,0,market);

if c>=enterprice+15 and c<=enterprice+19 and cross(enterprice+8,c) then sell(1,0,market);

if c>=enterprice+20 and c<=enterprice+22 and cross(enterprice+18,c) then sell(1,0,market);

if c<=enterprice-4 and c>=enterprice-9 and cross(c,enterprice-1) then sellshort(1,0,market);

if c<=enterprice-10 and c>=enterprice-14 and cross(c,enterprice-3) then sellshort(1,0,market);

if c<=enterprice-15 and c>=enterprice-19 and cross(c,enterprice-8) then sellshort(1,0,market);

if c<=enterprice-20 and c>=enterprice-22 and cross(c,enterprice-18) then sellshort(1,0,market);

if hhv(h,enterbars+1)>enterprice+20 and hhv(h,enterbars+1)+23 and cross(enterprice-2,close) then sell(1,0,market);

if llv(l,enterbars+1)<enterprice-20 and llv(l,enterbars+1)-23 and cross(c,enterprice+2) then sellshort(1,0,market);

if openprofit>=0 and time0>=timetot0(closetime(0))-60*2 then begin

    sell(1,0,market);

    sellshort(1,0,market);

end

 


 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | 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

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


加好友 发短信
等级:论坛游民 帖子:122 积分:0 威望:0 精华:0 注册:2015/12/9 12:32:38
  发帖心情 Post By:2015/12/28 14:00:58    Post IP:101.90.255.170[只看该作者]


是新思路,与原来不一样。着重点是:(用在1分钟、3分钟国债期货上)
 
1、当收盘价大于分时均价线价空单平仓同时买入开仓;
2、收盘价小于分时均价线价多单平仓同时卖出开仓;
3、过滤原则。
4、最大亏损12跳;

5、盈利4跳至9跳,如果回调至盈利1跳时平仓;盈利10跳至14跳,如果回调至盈利3跳时平仓;盈利15跳至19跳,如果回调至盈利8跳时平仓;盈利20跳至22跳,如果回调至盈利18跳时平仓;23跳以上跟踪止盈,则最新价从上一次高点回撤3跳,止赢。


 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | 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

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


加好友 发短信
等级:论坛游民 帖子:122 积分:0 威望:0 精华:0 注册:2015/12/9 12:32:38
  发帖心情 Post By:2015/12/28 14:47:06    Post IP:101.90.255.170[只看该作者]

谢谢,不过:

分时均价线价



1、当收盘价大于分时均价线价空单平仓同时买入开仓;
2、收盘价小于分时均价线价多单平仓同时卖出开仓;
3、过滤原则。

 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | 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

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


加好友 发短信
等级:论坛游民 帖子:122 积分:0 威望:0 精华:0 注册:2015/12/9 12:32:38
  发帖心情 Post By:2015/12/28 15:33:13    Post IP:101.90.255.170[只看该作者]


谢谢老师!可是:
我是仅在分时均价线:
1、当收盘价大于分时均价线价空单平仓同时买入开仓;
2、收盘价小于分时均价线价多单平仓同时卖出开仓;
3、过滤原则。
而4楼的程序为什么还在价格远远超过分时均价线之上还有多次开仓。应该是如果超过分时均价线后收盘价没有再跌回均价线之下仅有一次在收盘价超过分时均价线开仓,没有再次开仓的。
结合图片,9:39分后,应该不再开仓了。
此主题相关图片如下:111qq图片20151228152841.png
按此在新窗口浏览图片

此主题相关图片如下:222qq图片20151228152914.png
按此在新窗口浏览图片


 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | 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
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | 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

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


加好友 发短信
等级:论坛游民 帖子:122 积分:0 威望:0 精华:0 注册:2015/12/9 12:32:38
  发帖心情 Post By:2015/12/28 16:01:42    Post IP:101.90.255.170[只看该作者]

是的,谢谢老师。8楼的理解太对了。

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