以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  提前N秒下单  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=138395)

--  作者:muxia5568
--  发布时间:2016/8/22 15:10:57
--  提前N秒下单
请教金老师;我是普通版软件,模型是5分钟周期走完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


--  作者:jinzhe
--  发布时间:2016/8/22 15:49:41
--  
可以,但是要用固定时间间隔模式下单