指標引用的速度問題
作者:金字塔 來源:cxh99.com 發布時間:2017年01月23日
- 咨詢內容:
在交易系統中引用一個指標,和把這個指標寫在交易系統里,這兩個作比較哪個運行速度更快一些
- 金字塔客服:
引用快一點
- 用戶回復:
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);endif ref(bb,1) and holding>0 then begin 平多:sell(1,holding,limitr,o); tsell(1,holding,mkt);endif ref(aa,1) and holding=0 then begin 開多:buy(1,1,limter,o); tbuy(1,1,mkt);endif ref(bb,1) and holding=0 then begin 開空:buyshort(1,1limter,o); tbuyshort(1,1,mkt);end
請問,我把上面的1個系統用后臺跑兩個品種ag和au,兩個品種間的開平會相互干擾嗎,比如ag的開倉信號,結果把au的倉給開了。
- 網友回復:
不會,不影響