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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → jinzhe老师,麻烦指导一下

   

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


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

主题:jinzhe老师,麻烦指导一下

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
jinzhe老师,麻烦指导一下  发帖心情 Post By:2015/11/19 9:01:36    Post IP:124.152.32.98[只看该作者]

我用的图表化程序看信号,信号不按顺序出,还有一点就是怎么做到当日周期内已经成交了的条件在这一个周期内不在成交,在一下个周期再成交?现在就是开仓所有信号出完之后,又有一拨新的信号出现,怎么才能控制住1个周期内只成交1次,不管是现在持仓呢还是当日已经有过持仓已经被平掉,当日都不在开仓,我把holding,time>tt+15这些函数都尝试过了,但都是没有用,尝试了1晚还是不行啊,麻烦老师指导一下

图片点击可在新窗口打开查看此主题相关图片如下:捕获.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 9:17:52    Post IP:124.152.32.98[只看该作者]

附源码:

GLOBALVARIABLE:n1=0,n2=0,n3=0,n4=0,n5=0,n6=0,n7=0,n8=0,n9=0,n10=0,n11=0,n12=0,n13=0,n14=0,n15=0,n16=0,n17=0,n18=0,n19=0,n20=0,n21=0,n22=0,n23=0,n24=0,n25=0;

GLOBALVARIABLE:tt1=0,tt2=0,tt3=0,tt4=0,tt5=0,tt6=0,tt7=0,tt8=0,tt9=0,tt10=0,tt11=0,tt12=0,tt13=0,tt14=0,tt15=0,tt16=0,tt17=0,tt18=0,tt19=0,tt20=0,tt21=0,tt22=0,tt23=0,tt24=0,tt25=0;

oo:=VALUEWHEN(todaybar=1,o);

 

if c<oo-2*mindiff  and n1=0 and time<>tt1 then begin

tbuyshort(1,25,mkt);

n1:=1;

tt1:=time;

END

 

 

if c<oo-4*mindiff  and n2=0 and time<>tt2 and TENTERBARS>0 then begin

tbuyshort(1,24,mkt);

n2:=1;

tt2:=time;;

END

 

if c<oo-6*mindiff  and n3=0 and time<>tt3 and TENTERBARS>0 then begin

tbuyshort(1,23,mkt);

n3:=1;

tt3:=time;

end

 

if c<oo-8*mindiff  and n4=0 and time<>tt4 and TENTERBARS>0 then begin

tbuyshort(1,22,mkt);

n4:=1;

tt4:=time;

end

 

if c<oo-10*mindiff  and n5=0 and time<>tt5 and TENTERBARS>0 then begin

tbuyshort(1,21,mkt);

n5:=1;

tt5:=time;

end

 

if c<oo-12*mindiff  and n6=0 and time<>tt6 and TENTERBARS>0 then begin

tbuyshort(1,20,mkt);

n6:=1;

tt6:=time;

end

if c<oo-14*mindiff  and n7=0 and time<>tt7 and TENTERBARS>0 then begin

tbuyshort(1,19,mkt);

n7:=1;

tt7:=time;

end

 

if c<oo-16*mindiff  and n8=0 and time<>tt8 and TENTERBARS>0 then begin

tbuyshort(1,18,mkt);

n8:=1;

tt8:=time;

end

 

if c<oo-18*mindiff  and n9=0 and time<>tt9 and TENTERBARS>0 then begin

tbuyshort(1,17,mkt);

n9:=1;

tt9:=time;;

END

 

if c<oo-20*mindiff  and n10=0 and time<>tt10 and TENTERBARS>0 then begin

tbuyshort(1,16,mkt);

n10:=1;

tt10:=time;

end

 

if c<oo-22*mindiff  and n11=0 and time<>tt11 and TENTERBARS>0 then begin

tbuyshort(1,15,mkt);

n11:=1;

tt11:=time;

end

 

if c<oo-24*mindiff  and n12=0 and time<>tt12 and TENTERBARS>0 then begin

tbuyshort(1,14,mkt);

n12:=1;

tt12:=time;

end

 

if c<oo-26*mindiff  and n13=0 and time<>tt13 and TENTERBARS>0 then begin

tbuyshort(1,13,mkt);

n13:=1;

tt13:=time;

end

if c<oo-28*mindiff  and n14=0 and time<>tt14 and TENTERBARS>0 then begin

tbuyshort(1,12,mkt);

n14:=1;

tt14:=time;

end

 

if c<oo-30*mindiff  and n15=0 and time<>tt15 and TENTERBARS>0 then begin

tbuyshort(1,11,mkt);

n15:=1;

tt15:=time;

end

 

if c<oo-32*mindiff  and n16=0 and time<>tt16 and TENTERBARS>0 then begin

tbuyshort(1,10,mkt);

n16:=1;

tt16:=time;

end

 

if c<oo-34*mindiff  and n17=0 and time<>tt17 and TENTERBARS>0 then begin

tbuyshort(1,9,mkt);

n17:=1;

tt17:=time;

end

 

if c<oo-36*mindiff  and n18=0 and time<>tt18 and TENTERBARS>0 then begin

tbuyshort(1,8,mkt);

n18:=1;

tt18:=time;

end

 

if c<oo-38*mindiff  and n19=0 and time<>tt19 and TENTERBARS>0 then begin

tbuyshort(1,7,mkt);

n19:=1;

tt19:=time;

end

 

if c<oo-40*mindiff  and n20=0 and time<>tt20 and TENTERBARS>0 then begin

tbuyshort(1,6,mkt);

n20:=1;

tt20:=time;

end

 

if c<oo-42*mindiff  and n21=0 and time<>tt21 and TENTERBARS>0 then begin

tbuyshort(1,5,mkt);

n21:=1;

tt21:=time;

end

 

if c<oo-44*mindiff  and n22=0 and time<>tt22 and TENTERBARS>0 then begin

tbuyshort(1,4,mkt);

n22:=1;

tt22:=time;

end

 

if c<oo-46*mindiff  and n23=0 and time<>tt23 and  TENTERBARS>0 then begin

tbuyshort(1,3,mkt);

n23:=1;

tt23:=time;

end

 

if c<oo-48*mindiff  and n24=0 and time<>tt24 and TENTERBARS>0 then begin

tbuyshort(1,2,mkt);

n24:=1;

tt24:=time;

end

 

if c<oo-50*mindiff  and n25=0 and time<>tt25 and TENTERBARS>0 then begin

tbuyshort(1,1,mkt);

n25:=1;

tt25:=time;

end

 

if time=closetime(0) and TENTERBARS>0 then begin

n1:=0;

n2:=0;

n3:=0;

n4:=0;

n5:=0;

n6:=0;

n7:=0;

n8:=0;

n9:=0;

n10:=0;

n11:=0;

n12:=0;

n13:=0;

n14:=0;

n15:=0;

n16:=0;

n17:=0;

n18:=0;

n19:=0;

n20:=0;

n21:=0;

n22:=0;

n23:=0;

n24:=0;

n25:=0;

 

 

tt1:=0;

tt2:=0;

tt3:=0;

tt4:=0;

tt5:=0;

tt6:=0;

tt7:=0;

tt8:=0;

tt9:=0;

tt10:=0;

tt11:=0;

tt12:=0;

tt13:=0;

tt14:=0;

tt15:=0;

tt16:=0;

tt17:=0;

tt18:=0;

tt19:=0;

tt20:=0;

tt21:=0;

tt22:=0;

tt23:=0;

tt24:=0;

tt25:=0;

end

 

 

GLOBALVARIABLE:num=0;

PK:=(TAVGENTERPRICEEX2('','',1)-DYNAINFO(7))*TSELLHOLDING(1)*DYNAINFO(209)>500;

debugfile('D:\test.txt','当前盈亏为%.2f',TOPENPROFIT);

盈亏:=(DYNAINFO(7)-TAVGENTERPRICEEX2('','',0))*TBUYHOLDING(1)*DYNAINFO(209);

debugfile('D:\test2.txt','当前盈亏为%.2f',盈亏);

if PK  and TSELLHOLDING(1)>0 and num=0 THEN begin

tsellshort(1,10,mkt);

num:=1;

end

 

PK2:=(TAVGENTERPRICEEX2('','',1)-DYNAINFO(7))*TSELLHOLDING(1)*DYNAINFO(209)>1000;

if PK2  and TSELLHOLDING(1)>0 and num=1 THEN begin

tsellshort(1,20,mkt);

num:=2;

end

 

PK3:=(TAVGENTERPRICEEX2('','',1)-DYNAINFO(7))*TSELLHOLDING(1)*DYNAINFO(209)>2000;

if PK3  and TSELLHOLDING(1)>0 THEN begin

tsellshort(1,TSELLHOLDING(1),mkt);

end


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


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

贴下单日志,贴出你认为是错误下单的那段日志


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

客户服务部

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

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

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 9:35:02    Post IP:124.152.32.98[只看该作者]

日志没有记录,顺势一直成交的很好,就开始反弹就立马又从第1个上面成交了,遇到盘着的行情,就重新成交

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 9:55:50    Post IP:124.152.32.98[只看该作者]

老师????我现在只想限定一下,当日周期内只开这1次、、、、

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 10:00:52    Post IP:124.152.32.98[只看该作者]

图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 10:01:26    Post IP:124.152.32.98[只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:捕获.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 10:16:14    Post IP:124.152.32.98[只看该作者]

图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 10:16:28    Post IP:124.152.32.98[只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:捕获.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游民 帖子:270 积分:0 威望:0 精华:0 注册:2015/10/11 9:07:21
  发帖心情 Post By:2015/11/19 10:25:39    Post IP:124.152.32.98[只看该作者]

今天成交完,第2天再成交

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