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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请高手帮忙!

   

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


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

主题:请高手帮忙!

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


加好友 发短信
等级:新手上路 帖子:66 积分:266 威望:0 精华:0 注册:2012/12/14 19:24:19
请高手帮忙!  发帖心情 Post By:2013/4/16 9:57:35    Post IP:60.28.127.37[只看该作者]

runmode:0;
variable:cc=0;
islast:=islastbar;
bb:=c>o+0.6;
ss:=c<o-0.6;
if cc>0 and ss then cc:=0;
if cc<0 and bb then cc:=0;
if cc=0 and bb then cc:=1;
if cc=0 and ss then cc:=-1;
lcc:=ref(cc,1);
if islast then att:=extgbdata('att');

if (lcc>0 and cc<=0) or (islast and cc<=0 and barpos>att and tbuyholding(1)>0) then begin
 exitlong:1;
 if lcc>0 and cc<=0 and islast then extgbdataset('att',barpos);
end
if (lcc<0 and cc>=0) or (islast and cc>=0 and barpos>att and tsellholding(1)>0) then begin
 exitshort:1;
 if lcc<0 and cc>=0 and islast then extgbdataset('att',barpos);
end
if (lcc<=0 and cc>0) or (islast and cc>0 and barpos>att and tbuyholding(1)=0) then begin
 enterlong:1;
 if lcc<=0 and cc>0 and islast then extgbdataset('att',barpos);
end
if (lcc>=0 and cc<0) or (islast and cc<0 and barpos>att and tsellholding(1)=0) then begin
 entershort:1;
 if lcc>=0 and cc<0 and islast then extgbdataset('att',barpos);
end

 

 

帮忙改成K线走完提前N秒下单信号消失次周期恢复持仓!

这是阿火的,及时下单信号消失次周期恢复吃仓!

 

帮忙修改!谢谢!

 

 


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


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

zq:=2;//周期类型,2分钟就填2,3分钟就填3 ,5分钟就填5,10分钟就填10
tq:=5;//提前的秒数,最多提前60秒
lastopentm:=if(date<>ref(date,1),0,ref(openminutes(time),1));//上一根K线的开盘分钟数
ticktm:=dynainfo(207);
abb:=(mod(ticktm,100)>=60-tq and (openminutes(ticktm)-lastopentm=zq-1 or (ticktm>=112900 and ticktm<=113000) or (ticktm>=151400 and ticktm<=151500))) or not(islastbar);

 

平仓条件加上ABB



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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:66 积分:266 威望:0 精华:0 注册:2012/12/14 19:24:19
  发帖心情 Post By:2013/4/16 10:21:34    Post IP:60.28.127.37[只看该作者]

开仓条件不加上ABB?

在K线走完模式,开仓和平仓都要提前N秒下单,并在信号消失后次周期恢复持仓!

 


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


加好友 发短信
等级:新手上路 帖子:66 积分:266 威望:0 精华:0 注册:2012/12/14 19:24:19
  发帖心情 Post By:2013/4/16 10:27:03    Post IP:60.28.127.37[只看该作者]

我要的效果是:

在K线走完模式,开仓和平仓都要提前N秒下单,并在信号消失后次周期恢复持仓!

 


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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2013/4/16 10:37:33    Post IP:58.246.57.26[只看该作者]

那全加上不就得了


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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:66 积分:266 威望:0 精华:0 注册:2012/12/14 19:24:19
  发帖心情 Post By:2013/4/16 11:30:42    Post IP:60.28.127.37[只看该作者]

信号消失次周期不恢复持仓?

 


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


加好友 发短信
等级:新手上路 帖子:66 积分:266 威望:0 精华:0 注册:2012/12/14 19:24:19
  发帖心情 Post By:2013/4/16 13:25:29    Post IP:60.28.127.37[只看该作者]

顶!


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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2013/4/16 13:38:32    Post IP:58.246.57.26[只看该作者]

完整代码贴一下


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

客户服务部

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

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

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


加好友 发短信
等级:新手上路 帖子:66 积分:266 威望:0 精华:0 注册:2012/12/14 19:24:19
  发帖心情 Post By:2013/4/16 13:45:15    Post IP:60.28.127.37[只看该作者]

runmode:0;
 
input:n1(4,1,100,1);
input:n2(9,1,100,1);
input:n3(18,1,100,1);
 
ma1:=ma(close,n1);
ma2:=ma(close,n2);
ma3:=ma(close,n3);


zq:=2;//周期类型,2分钟就填2,3分钟就填3 ,5分钟就填5,10分钟就填10
tq:=5;//提前的秒数,最多提前60秒
lastopentm:=if(date<>ref(date,1),0,ref(openminutes(time),1));//上一根K线的开盘分钟数
ticktm:=dynainfo(207);
abb:=(mod(ticktm,100)>=60-tq and (openminutes(ticktm)-lastopentm=zq-1 or (ticktm>=112900 and ticktm<=113000) or (ticktm>=151400 and ticktm<=151500))) or not(islastbar);

 

 

 


if holding=0 then begin
     if close>ma1 and ma1>ma2 and ma2>ma3 and abb then
         buy(1,1,limitr,close);
end
 
if holding=0 then begin
    if close<ma1 and ma1<ma2 and ma2<ma3 and abb then
        buyshort(1,1,limitr,close);
end

if holding>0 and abb then begin
     if ma1<ma2 then
         sell(1,holding,limitr,close);
end
 
if holding<0 and abb  then begin
     if ma1>ma2 then
         sellshort(1,holding,limitr,close);
end


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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2013/4/16 14:00:46    Post IP:58.246.57.26[只看该作者]

不能用图表,用后台



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

客户服务部

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

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

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