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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 自动交易

   

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


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

主题:自动交易

帅哥哟,离线,有人找我吗?
曹晓东
  41楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游民 帖子:178 积分:0 威望:0 精华:0 注册:2016/10/17 16:49:11
  发帖心情 Post By:2016/12/1 11:45:18    Post IP:175.11.159.50[只看该作者]

不对了  肯定是出了问题了    每一根都出现信号
图片点击可在新窗口打开查看此主题相关图片如下:qq图片20161201114446.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/1 13:22:24    Post IP:180.169.30.6[只看该作者]

少写一个0了,这样改:
if (time>=112500 and time<=113000) or (time>=145500 and time<=150000) or (time>=225500 and time<=230000) then begin
   sell(1,0,thisclose);
   sellshort(1,0,thisclose);
end 


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

客户服务部

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

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

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


加好友 发短信
等级:论坛游民 帖子:178 积分:0 威望:0 精华:0 注册:2016/10/17 16:49:11
  发帖心情 Post By:2016/12/1 13:30:34    Post IP:175.11.159.50[只看该作者]

怎样能编制出若“1条件”满足的时候“2条件”没满足。1条件等待2条件满足的时候马上开单?

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/1 13:56:10    Post IP:116.231.212.45[只看该作者]

VAIRALBE:bj=0;

if 条件1 then bj:=1;

 

if bj=1 and 条件2 then buy......;

 

然后在sell里面重置bj:=0;



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

客户服务部

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

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

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


加好友 发短信
等级:论坛游民 帖子:178 积分:0 威望:0 精华:0 注册:2016/10/17 16:49:11
  发帖心情 Post By:2016/12/1 13:57:00    Post IP:175.11.159.50[只看该作者]

还有个问题   咱14:55分以后可不可以不再开新的单,有单的在11:30前必须平掉
图片点击可在新窗口打开查看此主题相关图片如下:11.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:论坛游民 帖子:178 积分:0 威望:0 精华:0 注册:2016/10/17 16:49:11
  发帖心情 Post By:2016/12/1 14:14:29    Post IP:175.11.159.50[只看该作者]


variable:bj=0;
ss:=stkindi('','时间.tt',0,5);
a1:=ref(HIGH,22); 
a2:=ref(HIGH,10); 
a6:=ref(l,22);
a7:=ref(l,10);




a3:=c>a1 and c>a2;
a8:=c<a6 and c<a7;

mm:=ref(h,1)=hhv(h,3) or ref(h,2)=hhv(h,3) or ref(h,3)=hhv(h,3);
nn:=ref(l,1)=llv(l,3) or ref(l,2)=hhv(l,3) or ref(l,3)=hhv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;

uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);
tt:=(time>=090512 and time<=112400) or (time>=133500 and time<=145400) or (time>=210500 and time<=225500);

aa1:=ma(c,10);
aa3:=PARTLINE(a1>ref(a1,1),a1,colorred,1);
aa6:=PARTLINE(a1<ref(a1,1),a1,colorgreen,1);
aa2:=ma(c,22);
aa4:=PARTLINE(a2>ref(a2,1),a2,colorred,2);
aa5:=PARTLINE(a2<ref(a2,1),a2,colorgreen,2);
aa7:=aa3 and aa4;
aa8:=aa6 and aa5;








 
 n1:=hhvbars(vol,10);
 h10:=ref(h,n1);
 if holding<0 and c>h10 then sellshort(1,0,thisclose);
 
 l10:=ref(l,n1); 
 if holding>0 and c<l10 then sell(1,0,thisclose);
 
 

if (time>=112500 and time<=113000) or (time>=145500 and time<=150000) or (time>=225500 and time<=230000) then begin
   sell(1,0,thisclose);
  sellshort(1,0,thisclose);
end 
 

在这里面帮忙加一个当uu3出现,等待aa8,当aa8出现,然后开空。 uu4出现,等待aa7,aa7出现,开多。

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


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

以下是引用jinzhe在2016-12-1 11:26:03的发言:

一定要走完k线的话,那么就只能用系统自带的止盈止损,这个是即时触发的,但是没有信号的

涨跌停这个因为没有历史数据所以一直不太好用在图表交易里面

如果是北京时间坐标,那么下面的交易时间:9:05--11:25、13:35--14:55、21:.5--22:55,在开仓条件里面添加下列条件:

tt:= (time>=090512 and time<=112500) or (time>=133500 and time<=145500) or (time>=210500 and time<=225500);

限定时间出信号,是这里的代码,开仓条件添加tt



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

客户服务部

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

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

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


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

以下是引用曹晓东在2016-12-1 14:14:29的发言:

variable:bj=0;
ss:=stkindi('','时间.tt',0,5);
a1:=ref(HIGH,22); 
a2:=ref(HIGH,10); 
a6:=ref(l,22);
a7:=ref(l,10);




a3:=c>a1 and c>a2;
a8:=c<a6 and c<a7;

mm:=ref(h,1)=hhv(h,3) or ref(h,2)=hhv(h,3) or ref(h,3)=hhv(h,3);
nn:=ref(l,1)=llv(l,3) or ref(l,2)=hhv(l,3) or ref(l,3)=hhv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;

uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);
tt:=(time>=090512 and time<=112400) or (time>=133500 and time<=145400) or (time>=210500 and time<=225500);

aa1:=ma(c,10);
aa3:=PARTLINE(a1>ref(a1,1),a1,colorred,1);
aa6:=PARTLINE(a1<ref(a1,1),a1,colorgreen,1);
aa2:=ma(c,22);
aa4:=PARTLINE(a2>ref(a2,1),a2,colorred,2);
aa5:=PARTLINE(a2<ref(a2,1),a2,colorgreen,2);
aa7:=aa3 and aa4;
aa8:=aa6 and aa5;








 
 n1:=hhvbars(vol,10);
 h10:=ref(h,n1);
 if holding<0 and c>h10 then sellshort(1,0,thisclose);
 
 l10:=ref(l,n1); 
 if holding>0 and c<l10 then sell(1,0,thisclose);
 
 

if (time>=112500 and time<=113000) or (time>=145500 and time<=150000) or (time>=225500 and time<=230000) then begin
   sell(1,0,thisclose);
  sellshort(1,0,thisclose);
end 
 

在这里面帮忙加一个当uu3出现,等待aa8,当aa8出现,然后开空。 uu4出现,等待aa7,aa7出现,开多。

上面的标记是要加在开仓语句里面的,你这里的开仓语句没了



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

客户服务部

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

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

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


加好友 发短信
等级:论坛游民 帖子:178 积分:0 威望:0 精华:0 注册:2016/10/17 16:49:11
  发帖心情 Post By:2016/12/1 14:22:53    Post IP:175.11.159.50[只看该作者]

variable:dt=0,kt=0;
ss:=stkindi('','时间.tt',0,5);
a1:=ref(HIGH,22); 
a2:=ref(HIGH,10); 
a6:=ref(l,22);
a7:=ref(l,10);




a3:=c>a1 and c>a2;
a8:=c<a6 and c<a7;

mm:=ref(h,1)=hhv(h,3) or ref(h,2)=hhv(h,3) or ref(h,3)=hhv(h,3);
nn:=ref(l,1)=llv(l,3) or ref(l,2)=hhv(l,3) or ref(l,3)=hhv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;

uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);

aa1:=ma(c,10);
aa3:=PARTLINE(a1>ref(a1,1),a1,colorred,1);
aa6:=PARTLINE(a1<ref(a1,1),a1,colorgreen,1);
aa2:=ma(c,22);
aa4:=PARTLINE(a2>ref(a2,1),a2,colorred,2);
aa5:=PARTLINE(a2<ref(a2,1),a2,colorgreen,2);
aa7:=aa3 and aa4;
aa8:=aa6 and aa5;


tt:=(time>=090512 and time<=112400) or (time>=133500 and time<=145400) or (time>=210500 and time<=225500);
if uu3 and a8 and holding=0  and tt then begin  
 buyshort(holding=0,1,market);
 end
if a3 and uu4 and holding=0 and tt then begin
 buy(holding=0,1,market);
 end
 
 b1:=c<ref(l,barslast(c>o));
 if a8 and b1 and holding=0 and tt  then begin
  buyshort(holding=0,1,market);
 end
 
b2:=c>ref(h,barslast(c<o));
 if a3 and b2 and  holding=0 and tt then begin
  buy(holding=0,1,market);
 end
 
 n1:=hhvbars(vol,10);
 h10:=ref(h,n1);
 if holding<0 and c>h10 then sellshort(1,0,thisclose);
 
 l10:=ref(l,n1); 
 if holding>0 and c<l10 then sell(1,0,thisclose);
 
 //if holding<0 and c>a2 then sellshort(1,0,thisclose);
 //if holding<0 and uu4 then sellshort(1,0,thisclose);
 //if holding<0 and c>ref(h,22) then  sellshort(1,0,thisclose);
 //if holding>0 and c<ref(l,22) then  sell(1,0,thisclose); 
//if holding>0 and c<a7 then sell(1,0,thisclose);
// if holding>0 and uu3 then sell(1,0,thisclose);

if (time>=112500 and time<=113000) or (time>=145500 and time<=150000) or (time>=225500 and time<=230000) then begin
   sell(1,0,thisclose);
  sellshort(1,0,thisclose);
end 
这样呢?不对的话你帮我加一个开仓吧   就是上一条的条件

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


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2016/12/1 14:33:19    Post IP:180.169.30.6[只看该作者]

variable:dt=0,kt=0;
ss:=stkindi('','时间.tt',0,5);
a1:=ref(HIGH,22);
a2:=ref(HIGH,10);
a6:=ref(l,22);
a7:=ref(l,10);

 

 

 


a3:=c>a1 and c>a2;
a8:=c<a6 and c<a7;


mm:=ref(h,1)=hhv(h,3) or ref(h,2)=hhv(h,3) or ref(h,3)=hhv(h,3);
nn:=ref(l,1)=llv(l,3) or ref(l,2)=hhv(l,3) or ref(l,3)=hhv(l,3);
if mm then bj:=1;
if nn then bj:=-1;
nn1:=barslast(mm);
nn2:=barslast(nn);
if c<ref(l,nn1+1) and bj=1 then i:=1;
if c>ref(h,nn2+1) and bj=-1 then i:=-1;


uu3:=cross(i=1,0.5);
uu4:=cross(i=-1,0.5);

if uu3 then kt:=1;
if uu4 then dt:=1;
aa1:=ma(c,10);
aa3:=PARTLINE(a1>ref(a1,1),a1,colorred,1);
aa6:=PARTLINE(a1<ref(a1,1),a1,colorgreen,1);
aa2:=ma(c,22);
aa4:=PARTLINE(a2>ref(a2,1),a2,colorred,2);
aa5:=PARTLINE(a2<ref(a2,1),a2,colorgreen,2);
aa7:=aa3 and aa4;
aa8:=aa6 and aa5;

 


tt:=(time>=090512 and time<=112400) or (time>=133500 and time<=145400) or (time>=210500 and time<=225500);
if kt=1 and  a8 and holding=0  and tt then begin 
 buyshort(holding=0,1,market);
 end
if dt=1 and  uu4 and holding=0 and tt then begin
 buy(holding=0,1,market);
 end
 
 b1:=c<ref(l,barslast(c>o));
 if a8 and b1 and holding=0 and tt  then begin
  buyshort(holding=0,1,market);
 end
 
b2:=c>ref(h,barslast(c<o));
 if a3 and b2 and  holding=0 and tt then begin
  buy(holding=0,1,market);
 end
 
 n1:=hhvbars(vol,10);
 h10:=ref(h,n1);
 if holding<0 and c>h10 then begin
   dt:=0;
   kt:=0;
   sellshort(1,0,thisclose);
 end
 l10:=ref(l,n1);
 if holding>0 and c<l10 then begin
  dt:=0;
  kt:=0;
  sell(1,0,thisclose);
 end
 
 //if holding<0 and c>a2 then sellshort(1,0,thisclose);
 //if holding<0 and uu4 then sellshort(1,0,thisclose);
 //if holding<0 and c>ref(h,22) then  sellshort(1,0,thisclose);
 //if holding>0 and c<ref(l,22) then  sell(1,0,thisclose);
//if holding>0 and c<a7 then sell(1,0,thisclose);
// if holding>0 and uu3 then sell(1,0,thisclose);


if (time>=112500 and time<=113000) or (time>=145500 and time<=150000) or (time>=225500 and time<=230000) then begin
   sell(1,0,thisclose);
  sellshort(1,0,thisclose);
  kt:=0;
  dt:=0;
end

 



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

客户服务部

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

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

 回到顶部
总数 53 上一页 1 2 3 4 5 6 下一页