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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 老师,请教“手动下单 程序化平仓”的问题

   

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


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

主题:老师,请教“手动下单 程序化平仓”的问题

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


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

需要用固定时间间隔的模式,不能用走完k线,所以用户前面讲的1分钟收盘时平仓做不到


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

客户服务部

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

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

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


加好友 发短信
等级:论坛游侠 帖子:208 积分:0 威望:0 精华:0 注册:2016/6/25 10:33:10
  发帖心情 Post By:2016/7/15 13:44:50    Post IP:183.128.94.178[只看该作者]

GLOBALVARIABLE:bj=0;
if bj=0 and c<tenterprice-10 and tbuyholding(0)>0 then tsell(1,0,mkt);
if bj=0 and c<tenterprice+10 and TSELLHOLDING(0)>0 then tsellshort(1,0,mkt);

if tenterbars>0 and count(vol>2*ref(ma(vol,5),1),tenterbars+1)=2 and bj=0 then begin
 tsell(1,50%,mkt),PERTRADER;
 bj:=1;
end

if tenterbars>0 and count(vol>2*ref(ma(vol,5),1),tenterbars+1)=2 and bj=0 then begin
 tsellshort(1,50%,mkt),PERTRADER;
 bj:=1;
end

if bj=1 and c<tenterprice-20 and tbuyholding(0)>0 then begin
 tsell(1,0,mkt); 
 bj:=0;
end

if bj=1 and c<tenterprice+20 and TSELLHOLDING(0)>0 then begin
 tsellshort(1,0,mkt); 
 bj:=0;
end

if time=closetime(0) and (timetot0(dynainfo(207))>=time0-30) then begin 
 tsell(1,0,mkt); 
 tsellshort(1,0,mkt);
 bj:=0;
end

if time=closetime(1) and (timetot0(dynainfo(207))>=time0-30) then begin
 tsell(1,0,mkt);
 tsellshort(1,0,mkt);
 bj:=0;
end


可以这么写吗?就是多空平仓条件一样,都写在一起。

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


加好友 发短信
等级:论坛游侠 帖子:208 积分:0 威望:0 精华:0 注册:2016/6/25 10:33:10
  发帖心情 Post By:2016/7/15 13:55:09    Post IP:183.128.94.178[只看该作者]

GLOBALVARIABLE:bj=0;
if bj=0 and c<tenterprice-50 and tbuyholding(0)>0 then tsell(1,0,mkt);
if bj=0 and c<tenterprice+50 and TSELLHOLDING(0)>0 then tsellshort(1,0,mkt);

if tenterbars>0 and count(vol>2*ref(ma(vol,5),1),tenterbars+1)=2 and bj=0 then begin
 tsell(1,50%,mkt),PERTRADER;
 bj:=1;
end

if tenterbars>0 and count(vol>2*ref(ma(vol,5),1),tenterbars+1)=2 and bj=0 then begin
 tsellshort(1,50%,mkt),PERTRADER;
 bj:=1;
end

if bj=1 and c<tenterprice-20 and tbuyholding(0)>0 then begin
 tsell(1,0,mkt); 
 bj:=0;
end

if bj=1 and c<tenterprice+20 and TSELLHOLDING(0)>0 then begin
 tsellshort(1,0,mkt); 
 bj:=0;
end

if time=closetime(0) and (timetot0(dynainfo(207))>=time0-30) then begin 
 tsell(1,0,mkt); 
 tsellshort(1,0,mkt);
 bj:=0;
end

if time=closetime(1) and (timetot0(dynainfo(207))>=time0-30) then begin
 tsell(1,0,mkt);
 tsellshort(1,0,mkt);
 bj:=0;
end


可以这么写吗?就是多空平仓条件一样,都写在一起。

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


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

用户先做多头测试,可以之后再进行双向测试


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

客户服务部

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

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

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


加好友 发短信
等级:论坛游侠 帖子:208 积分:0 威望:0 精华:0 注册:2016/6/25 10:33:10
  发帖心情 Post By:2016/7/19 14:37:03    Post IP:183.158.84.242[只看该作者]

多头测试,目前正常。
在平仓条件相同的情况下,如何加入空头平仓?

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


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

GLOBALVARIABLE:bj=0,bjk=0;
if bj=0 and c<tenterprice-50 and tbuyholding(0)>0 then tsell(1,0,mkt);
if bjk=0 and c>tenterprice+50 and TSELLHOLDING(0)>0 then tsellshort(1,0,mkt);

if tenterbars>0 and count(vol>2*ref(ma(vol,5),1),tenterbars+1)=2 and bj=0 then begin
 tsell(1,50%,mkt),PERTRADER;
 bj:=1;
end

if tenterbars>0 and count(vol>2*ref(ma(vol,5),1),tenterbars+1)=2 and bjk=0 then begin
 tsellshort(1,50%,mkt),PERTRADER;
 bjk:=1;
end

if bj=1 and c<tenterprice-20 and tbuyholding(0)>0 then begin
 tsell(1,0,mkt); 
 bj:=0;
end

if bjk=1 and c>tenterprice+20 and TSELLHOLDING(0)>0 then begin
 tsellshort(1,0,mkt); 
 bjk:=0;
end

if time=closetime(0) and (timetot0(dynainfo(207))>=time0-30) then begin 
 tsell(1,0,mkt); 
 tsellshort(1,0,mkt);
 bj:=0;
end

if time=closetime(1) and (timetot0(dynainfo(207))>=time0-30) then begin
 tsell(1,0,mkt);
 tsellshort(1,0,mkt);
 bjk:=0;
end


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

客户服务部

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

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

 回到顶部
总数 76 上一页 1 2 3 4 5 6 7 8