金字塔委托單無(wú)故消失嚴(yán)重問(wèn)題 [金字塔]
- 咨詢(xún)內(nèi)容:
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系統(tǒng)自動(dòng)發(fā)了一張數(shù)量為2的平空單,此時(shí)接收到委托回報(bào)后的第1次刷新,可以正常查詢(xún)到有委托平空單。
在單子尚未成交或撤單以及賬戶(hù)依然在線(可以讀取到持倉(cāng)單)的情況下,委托單子突然消失了
(金字塔未成交委托的界面單子突然消失,輸出ordercount變量也突然變成0,但快期看到實(shí)際委托單子還在)。
版本3.1
情況出現(xiàn)多次了(有概率,大概5%,一般是剛下單或者過(guò)幾秒后)
————————————————————————————
輸出變量日志
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
————————————————————————————
- 金字塔客服:
看看下單日志是怎么記錄的
- 用戶(hù)回復(fù):
沒(méi)有寫(xiě)下單日志,報(bào)單記錄處,顯示10:25:00報(bào)單已提交但下一行沒(méi)有出現(xiàn)“未成交單”字樣。
【1】即使交易所委托回報(bào)丟失,也不至于突然閃了一下有委托單,而應(yīng)該一直為0才對(duì)啊
【2】持倉(cāng)刷新設(shè)置300ms,如果是回報(bào)問(wèn)題,應(yīng)該300Ms后會(huì)同步,但似乎這功能沒(méi)有效~ [此貼子已經(jīng)被作者于2014/2/18 12:07:07編輯過(guò)] - 網(wǎng)友回復(fù):
麻煩給個(gè)明確點(diǎn)的答復(fù),自從出現(xiàn)1次這樣的錯(cuò)誤以后,今天會(huì)一直出這種錯(cuò)誤,除非把賬戶(hù)登出再登陸才能解決~
- 網(wǎng)友回復(fù): d
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容