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
————————————————————————————
看看下单日志是怎么记录的
请留下您的QQ,工作人员联系你远程查看
请勾选记录交易日志,看看日志就什么都清楚了