初接触VBA,看了orderstatus的说明不是很理解。对于特定的orderID,我要如何得到它是否成交的信息?
"Tradeing" 每笔成交回报,此时Filled是本次成交数量,Remaining将始终为0
你写的这些我都看不懂,你能具体写一段代码举例给我看看吗?
例如现在我下了一个单,有它的orderID,我如何表示
if orderID成交 then
if orderID不成交 then
?
Sub ORDER_OrderStatusEx2(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, Account, AccountType)
if Status = "Filled" then
if orderID = xxxxxxxxx then
application.MsgOut 这个报单成交了
end if
end if
谢谢!另外,buy的函数中,有返回值: 下单失败返回0,否则返回本地订单ID(可能包含负数),通过此ID可以修改订单或者撤单等等操作
请问这个返回值怎么获取?似乎不可以直接ordertid=call buy()?
buy1 = order.buy(1,1,0,0,"CF00","ZQ","",0)
d1.AddBack(buy1)
buy1就是获取的报单id