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


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

   

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


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

主题:关于TORDERPRICE

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


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
关于TORDERPRICE  发帖心情 Post By:2015/3/31 16:28:34    Post IP:125.94.38.182[只看该作者]

为了控制不要在同价连续下单,用了这样一个控制,即比如,不连续同价平仓,

if tbuyholding(1)>0 then begin
if TISPRVREMAIN(2)=1 and TORDERPRICE(2,1)=TE then bc:=1;
if bc=0 then tsell(nTE-close>m,1,lmt,TE); 
bc:=1
end

但还是总是连续平到tbuyholding(1)=0为止,不知问题在哪

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


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

请问从哪里能够体现平仓之后留仓的?


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

客户服务部

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

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

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


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
  发帖心情 Post By:2015/3/31 16:44:44    Post IP:125.94.38.182[只看该作者]

整节程序如此
if (CS>CS1 or (nTE<=nTE1-0.4)) then begin//排名下降,下跌一个区间//nBE改成nTE
bc:=if(TISPRVREMAIN(2)=1 and TORDERPRICE(2,1)=TE,1,0);
so:=if(TISPRVREMAIN(3)=1 and TORDERPRICE(3,1)=TE,1,0);
if tholding2<e then begin
if tholding2>-e  then begin
if tholding2<=0 then begin
if tbuyholding(1)>0 then begin
if bc=0 then tsell(nTE-close>m,1,lmt,TE);
bc:=1;so:=1;
end
if tbuyholding(1)=0 then begin
if so=0 then tbuyshort(nTE-close>m,1,lmt,TE);
so:=1;bc:=1;
end
end
if tholding2=1 then begin
if tbuyholding(1)>1 then begin
if bc=0 then tsell(nTE-close>m,2,lmt,TE);
bc:=1;so:=1;
end
if tbuyholding(1)=1 then begin
if bc=0 then tsell(nTE-close>m,1,lmt,TE);
bc:=1;
if so=0 then tbuyshort(nTE-close>m,1,lmt,TE);
so:=1;
end
if tbuyholding(1)=0 then begin
if so=0 and bc=0 then tbuyshort(nTE-close>m,2,lmt,TE);
bc:=1;so:=1;
end
end
if tholding2>1 then begin
if tbuyholding(1)>=2 then begin
if bc=0 then tsell(nTE-close>m,2,lmt,TE);
bc:=1;
if so=0 then tbuyshort(nTE-close>m,1,lmt,TE);
so:=1;
end
if tbuyholding(1)=1 then begin
if bc=0 then tsell(nTE-close>m,1,lmt,TE);
bc:=1;
if so=0 then tbuyshort(nTE-close>m,1,lmt,TE);
so:=1;
end
if tbuyholding(1)=0 then begin
if bc=0 and so=0 then tbuyshort(nTE-close>m,2,lmt,TE);
bc:=1;so:=1;
end
end
end
if tholding2<=-e then begin//极限再平多开空
if ERSI1<=32 then so:=1;
if bc=0 and ERSI1>32 and tbuyholding(1)>1 then begin
tsell(nTE-close>m,2,lmt,TE);
bc:=1;
end
if bc=0 and ERSI1>32 and tbuyholding(1)=1 then begin
tsell(nTE-close>m,1,lmt,TE);
bc:=1;
end
if so=0 and ERSI1ms>32 then begin
tbuyshort(nTE-close>m,1,lmt,TE);
so:=1;
end
end
end
if tholding2>=e and taccount(4)<0 and ERSI1>-32 and down=1 then begin
if bc=0 and tbuyholding(1)>2 then begin
tsell(nTE-close>m,3,lmt,TE);
bc:=1;
so:=1;
end
if bc=0 and tbuyholding(1)>1 then begin
tsell(nTE-close>m,2,lmt,TE);
bc:=1;
end
if bc=0 and tbuyholding(1)=1 then begin
tsell(nTE-close>m,1,lmt,TE);
bc:=1;
end
if so=0 then begin
tbuyshort(nTE-close>m,1,lmt,TE);
tbuyshort(nTE-close>m,1,lmt,TE);
tbuyshort(nTE-close>m,1,lmt,TE);
so:=1;
end
end
end

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


加好友 发短信
等级:黑侠 帖子:791 积分:856 威望:0 精华:0 注册:2011/11/16 23:34:34
  发帖心情 Post By:2015/3/31 16:46:45    Post IP:125.94.38.182[只看该作者]

什么留仓?


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


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

以私信发代码调试

[此贴子已经被作者于2015/3/31 17:20:29编辑过]


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

客户服务部

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

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

 回到顶部