Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共6 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]order.TradeDetalied2返回的交易明细和保证金监控中心的交易明细对不上?

1楼
z7c9 发表于:2011/1/25 22:44:52

见图,两张图的红色价格对不上,另外怎么绿色的0成交价?

 

可以肯定的是保证金监控中心的成交明细是正确的。

 

VBA代码:

以下内容为程序代码:

1 Sub mytest()
2
3 dim date1
4 dim code1
5 dim market1
6 dim ordertype1
7 dim Action1
8 dim Price1
9 dim Volume1
10 dim Kaiping1
11
12 set oexcel=createobject("excel.application")
13 oexcel.visible=true
14 oexcel.workbooks.add
15
16 oexcel.cells(1,1)="合约"
17 oexcel.cells(1,2)="成交序号"
18 oexcel.cells(1,3)="成交时间"
19 oexcel.cells(1,4)="买/卖"
20 oexcel.cells(1,5)="投机/套保"
21 oexcel.cells(1,6)="成交价"
22 oexcel.cells(1,7)="手数"
23 oexcel.cells(1,8)="成交额"
24 oexcel.cells(1,9)="开/平"
25 oexcel.cells(1,10)="手续费"
26 oexcel.cells(1,11)="平仓盈亏"
27
28
29 for i=0 to order.TradeCount2-1
30
31 h=i+2
32
33 order.TradeDetalied2 i,date1,code1,market1,ordertype1,action1,price1,volume1,kaiping1,"00081"
34
35 oexcel.cells(h,1)=code1
36 oexcel.cells(h,2)=""
37 oexcel.cells(h,3)=date1
38
39 if action1=0 then
40     oexcel.cells(h,4)="买"
41 elseif action1=1 then
42     oexcel.cells(h,4)="卖"
43 end if
44
45 oexcel.cells(h,5)="投机"
46 oexcel.cells(h,6)=price1
47 oexcel.cells(h,7)=volume1
48 oexcel.cells(h,8)=""
49
50 if kaiping1=0 then
51     oexcel.cells(h,9)="开"
52 elseif kaiping=1 then
53     oexcel.cells(h,9)="平"
54 end if
55
56 oexcel.cells(h,10)=""
57 oexcel.cells(h,11)=""
58
59 next
60
61 End Sub

 

order.TradeDetalied2返回的交易明细:

图片点击可在新窗口打开查看

 

保证金监控中心的交易明细:

图片点击可在新窗口打开查看

 

[此贴子已经被作者于2011-1-25 22:46:36编辑过]
2楼
admin 发表于:2011/1/26 10:08:17
从CTP返回的明细好像是你的委托价,这个局限于CTP的后台原因,暂时没法解决
3楼
z7c9 发表于:2011/1/26 10:19:41
以下是引用admin在2011-1-26 10:08:17的发言:
从CTP返回的明细好像是你的委托价,这个局限于CTP的后台原因,暂时没法解决

金字塔无法得到真实的CTP成交回报么?

4楼
admin 发表于:2011/1/26 11:33:38
可以取到成交回报,但是交易明细返回的就是委托价,而不是成交价
5楼
z7c9 发表于:2011/1/26 19:11:51
以下是引用admin在2011-1-26 11:33:38的发言:
可以取到成交回报,但是交易明细返回的就是委托价,而不是成交价

那用什么方法可以取到实际的成交价格?

6楼
solarhe2006 发表于:2013/4/1 16:43:11

那用什么方法可以取到实际的成交价格?

共6 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.04297 s, 2 queries.