以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  指标引用的速度问题  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=100325)

--  作者:never827
--  发布时间:2016/7/7 14:58:50
--  指标引用的速度问题
在交易系统中引用一个指标,和把这个指标写在交易系统里,这两个作比较哪个运行速度更快一些
--  作者:jinzhe
--  发布时间:2016/7/7 15:06:10
--  
引用快一点
--  作者:never827
--  发布时间:2016/7/7 15:43:32
--  
aa:=cross(ma(c,5),ma(c,10));
bb:=cross(ma(c,10),ma(c,5));
if ref(aa,1) and holding<0 then begin
   平空:sellshort(1,holding,limitr,o);
   tsellshort(1,holding,mkt);
end
if ref(bb,1) and holding>0 then begin
   平多:sell(1,holding,limitr,o);
   tsell(1,holding,mkt);
end
if ref(aa,1) and holding=0 then begin
   开多:buy(1,1,limter,o);
   tbuy(1,1,mkt);
end
if ref(bb,1) and holding=0 then begin
   开空:buyshort(1,1limter,o);
   tbuyshort(1,1,mkt);
end

请问,我把上面的1个系统用后台跑两个品种ag和au,两个品种间的开平会相互干扰吗,比如ag的开仓信号,结果把au的仓给开了。

--  作者:jinzhe
--  发布时间:2016/7/7 16:00:14
--  
不会,不影响