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


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

   

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


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

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

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


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

修改后,还有一点没有解决,就是同一根K线开平仓,是否止盈止损条件还没有用上。如图
图片点击可在新窗口打开查看此主题相关图片如下:333qq图片20151228163241.png
图片点击可在新窗口打开查看

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

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


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

哦,我是以收盘价决定是否开平仓的,所以同一根k线不应当出现既开仓,又平仓的情况。

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

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


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



谢谢。另外,强调我除了开仓以收盘价之外,平仓也以收盘价来定的。

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

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


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

改后麻烦了,乱码了。
图片点击可在新窗口打开查看此主题相关图片如下:777qq图片20151228174024.png
图片点击可在新窗口打开查看

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

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