金字塔委托單無故消失嚴重問題 [金字塔]
- 咨詢內容:
VBA代碼:
————————————————————————
h_result=order.HoldingInfoByCode2(Code, Market, h_BuyHoding, h_BuyCost, h_BuyTodayHoding, h_SellHoding, h_SellCost, h_SellTodayHoding, h_PNL, h_UseMargin,Account)
buyhold= h_BuyHoding
sellhold=h_sellhoding
wtb=0
wts=0
wtbp=0
wtsp=0
ordercount=Order.OrderNum2
For i=0 to ordercount-1
Call Order.OrderInfo2(i,w_OrderID,w_ConSign,w_Filled,w_Remaining,w_Action,w_OrderType,w_LmtPrice,w_Account,w_Kaiping,w_Code,w_Market)
if w_Code=code and w_Account=account then
if w_Kaiping<0.5 then
if w_Action<0.5 then
wtb=wtb+w_Remaining
else
wts=wts+w_Remaining
end if
else
if w_Action<0.5 then
wtsp=wtsp+w_Remaining
else
wtbp=wtbp+w_Remaining
end if
end if
end if
Next
————————————————————————————
情況:
于10:25:00系統自動發了一張數量為2的平空單,此時接收到委托回報后的第1次刷新,可以正常查詢到有委托平空單。
在單子尚未成交或撤單以及賬戶依然在線(可以讀取到持倉單)的情況下,委托單子突然消失了
(金字塔未成交委托的界面單子突然消失,輸出ordercount變量也突然變成0,但快期看到實際委托單子還在)。
版本3.1
情況出現多次了(有概率,大概5%,一般是剛下單或者過幾秒后)
————————————————————————————
輸出變量日志
10:25:00 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
10:25:00 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=2 wt=2 ordercount=1
10:25:00 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
10:25:00 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
10:25:01 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
10:25:01 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
10:25:02 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
10:25:02 buyhold=0 sellhold=3 wtb=0 wts=0 wtbp=0 wtsp=0 wt=0 ordercount=0
————————————————————————————
- 金字塔客服:
看看下單日志是怎么記錄的
- 用戶回復:
沒有寫下單日志,報單記錄處,顯示10:25:00報單已提交但下一行沒有出現“未成交單”字樣。
【1】即使交易所委托回報丟失,也不至于突然閃了一下有委托單,而應該一直為0才對啊
【2】持倉刷新設置300ms,如果是回報問題,應該300Ms后會同步,但似乎這功能沒有效~ [此貼子已經被作者于2014/2/18 12:07:07編輯過] - 網友回復:
麻煩給個明確點的答復,自從出現1次這樣的錯誤以后,今天會一直出這種錯誤,除非把賬戶登出再登陸才能解決~
- 網友回復: d
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容