等级: 管理员
- 注册:
- 2021-5-18
- 曾用名:
|
您的账户,是不是当天没有委托记录啊,如果没有委托记录,会是0.
本地直接取默认账户的,当没有委托记录时,返回值为0,下了委托后,返回值就为1了。
测试代码如下,您本地可以试试,排查下
Dim Date
Dim Code
Dim Market
Dim OrderType
Dim Action
Dim Price
Dim Volume
Dim Remaining
Dim Kaiping
Dim HoldType
Dim Status
Dim BH
Dim OrderID
OrderCount = order.GetAllOrderDetaliedCount("")'调取当前登录默认账户
Application.msgout "OrderCount---"&OrderCount
For i = 0 To OrderCount-1
Result = Order.GetAllOrderDetaliedInfo(i,"",Date,Code,Market,OrderType,Action,Price,Volume,Remaining,Kaiping,HoldType,Status,BH,OrderID)
Application.msgout "Result--"&Result
If Result <> 0 Then
Application.MsgOut Date&"--"&Code&"--"&OrderID
End If
Next
'释放字符串变量内存
Set Code = nothing
Set Market = nothing
Set Account = nothing
Set Status = NoThing
Set BH = NoThing
---------------------------------------------------------
当有委托交易时,输出如下:
OrderCount---3
Result--1
2022/12/9 13:33:41--MA01--151783399
Result--1
2022/12/9 13:33:57--IF12--151783400
Result--1
2022/12/9 13:34:02--RB01--151783401
|
|