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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 我想提前两秒下单 58秒 开平仓

   

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


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

主题:我想提前两秒下单 58秒 开平仓

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


加好友 发短信
等级:超级版主 帖子:18691 积分:0 威望:0 精华:0 注册:2013/7/15 9:22:16
我想提前两秒下单 58秒 开平仓  发帖心情 Post By:2013/9/3 9:25:21    Post IP:58.246.57.26[只看该作者]

请教:2分钟的  K线走完模式  我想提前两秒下单 58秒  所有的开平仓  。

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


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

系统自带的走完k线提前下单模式,需要专业版


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

客户服务部

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

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

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


加好友 发短信
等级:超级版主 帖子:5895 积分:3774 威望:0 精华:0 注册:2012/1/1 0:00:01
  发帖心情 Post By:2013/9/3 9:38:13    Post IP:180.169.30.6[只看该作者]

 您好,参考下此贴第八讲提前N秒下单

 

http://www.weistock.com/bbs/dispbbs.asp?boardid=10&id=9439&authorid=0&page=0&star=2 



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

客户服务部

-----------------------------------------------------------

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

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
希望有
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:5 积分:0 威望:0 精华:0 注册:2013/9/3 9:49:18
  发帖心情 Post By:2013/9/3 9:51:15    Post IP:119.99.143.167[只看该作者]

火哥说的  提前下单 我没有搞定


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


加好友 发短信
等级:新手上路 帖子:5 积分:0 威望:0 精华:0 注册:2013/9/3 9:49:18
  发帖心情 Post By:2013/9/4 7:46:07    Post IP:119.99.134.222[只看该作者]

谢谢 LICHENGHU!

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


加好友 发短信
等级:新手上路 帖子:5 积分:0 威望:0 精华:0 注册:2013/9/3 9:49:18
  发帖心情 Post By:2013/9/4 7:46:52    Post IP:119.99.134.222[只看该作者]

八、提前N秒下单的方法,适用于各个周期

//这里以股指期货为例,商品原理类似:关键是找出K线结束的时间规律。

ma5:=ma(c,5);
ma10:=ma(c,10);
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 abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,1,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);

end

 

 

大家注意了

2.80版本以上,time这个函数有所变化,直接可以直接获得K线结束的时间。提前下单更加方便了

ma5:=ma(c,5);
ma10:=ma(c,10);
input:tq(5,3,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);

if abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,1,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);

end

 

 

 

这个我弄不出来


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


加好友 发短信
等级:罗宾汉 帖子:11808 积分:20695 威望:0 精华:10 注册:2009/8/18 8:15:13
  发帖心情 Post By:2013/9/4 8:11:33    Post IP:111.193.129.27[只看该作者]

以下是引用希望有在2013/9/4 7:46:52的发言:

八、提前N秒下单的方法,适用于各个周期

//这里以股指期货为例,商品原理类似:关键是找出K线结束的时间规律。

ma5:=ma(c,5);
ma10:=ma(c,10);
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 abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,1,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);

end

 

 

大家注意了

2.80版本以上,time这个函数有所变化,直接可以直接获得K线结束的时间。提前下单更加方便了

ma5:=ma(c,5);
ma10:=ma(c,10);
input:tq(5,3,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);

if abb then begin
  if holding>0 and ma5<ma10 then sell(1,1,thisclose);
  if holding<0 and ma5>ma10 then sellshort(1,1,thisclose);
  if holding=0 and ma5>ma10 then buy(1,1,thisclose);
  if holding=0 and ma5<ma10 then buyshort(1,1,thisclose);

end

 

 

 

这个我弄不出来

 

建议你购买专业版,使用自带的提前下单吧。代码编写需要用户有比较高的编程能力



金字塔—专业程序化软件提供商

金字塔-技术部

-----------------------------------------------------------------------------------------------------

工作时间:周一至周五 08:30 - 17:30   周末及法定节假日休息

Email:service@weistock.com
 回到顶部
帅哥哟,离线,有人找我吗?
希望有
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:5 积分:0 威望:0 精华:0 注册:2013/9/3 9:49:18
  发帖心情 Post By:2013/9/4 8:33:40    Post IP:119.99.134.222[只看该作者]

好的 谢谢你啊!

 


 回到顶部