Rss & SiteMap

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

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

标题:[求助]简单的跟单程序到后面编译器错误?

1楼
ch3coohqb 发表于:2015/6/15 10:45:48
 老版本用起来没任何问题
我更新到3.61版本现在用的时候出现编译器错误~


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

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

2楼
ch3coohqb 发表于:2015/6/15 10:46:53
 B帐户跟着A帐户下单~
B帐户只下A帐户一半的单子~
之前用起来没任何问题
现在怎么老提示编译器错误?
3楼
ch3coohqb 发表于:2015/6/15 10:50:08
妈的~我在调试机上运行起来没任何问题
实盘机器上又有问题
4楼
ch3coohqb 发表于:2015/6/15 11:04:38
有没有人管啊~我代码没任何问题
编译器错误是个什么东西?
5楼
wenarm 发表于:2015/6/15 11:06:48
稍等,已经在处理中。
6楼
ch3coohqb 发表于:2015/6/15 11:09:23
 图片点击可在新窗口打开查看

试了单TA还是这样
7楼
ch3coohqb 发表于:2015/6/15 11:10:24
 害惨我了~一单空单没开进去~
今天来调bug了~
以前跟单没任何问题
我调试机器上也没任何问题~
唯独实盘机器上有问题
8楼
王锋 发表于:2015/6/15 11:14:18

是64位版本还是32位版本的?

能否给出VBA代码,便于我们本地去重现问题?

9楼
ch3coohqb 发表于:2015/6/15 11:18:08
以下内容为程序代码:

1 Sub ORDER_OrderStatusEx2(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, Account, AccountType)
2
3 if Status="Tradeing" and filled>0 and Account="00545" and (StrComp(left(Code,2),"IC")=0 or StrComp(left(Code,2),"IF")=0) then'只跟IC
4 'if Status="Tradeing" and filled>0 and Account="00545" and StrComp(Code,"IC06")<>0 then
5 'if Status="Tradeing" and filled>0 and Account="00545" then
6 Call Order.HoldingInfoByCode2(Code, Market, BuyHoding_1, BuyCost_1, BuyTodayHoding_1, SellHoding_1, SellCost_1, SellTodayHoding_1, PNL_1, UseMargin_1,Account)
7 Call Order.HoldingInfoByCode2(Code, Market, BuyHoding_2, BuyCost_2, BuyTodayHoding_2, SellHoding_2, SellCost_2, SellTodayHoding_2, PNL_2, UseMargin_2,"01306")
8 if round(BuyHoding_1*0.51)>BuyHoding_2 then order.Buy 1,round(BuyHoding_1*0.51)-BuyHoding_2,0,0,code,market,"01306",0
9 if round(BuyHoding_1*0.51)<BuyHoding_2 then order.Sell 1,BuyHoding_2-round(BuyHoding_1*0.51),0,0,code,market,"01306",0
10 if round(SellHoding_1*0.51)>SellHoding_2 then order.Buyshort 1,round(SellHoding_1*0.51)-SellHoding_2,0,0,code,market,"01306",0
11 if round(SellHoding_1*0.51)<SellHoding_2 then order.sellshort 1,SellHoding_2-round(SellHoding_1*0.51),0,0,code,market,"01306",0
12 end if
13 '
14 'if Status="Tradeing" and filled>0 and Account="01306" then
15 'Call Order.HoldingInfoByCode2(Code, Market, BuyHoding_1, BuyCost_1, BuyTodayHoding_1, SellHoding_1, SellCost_1, SellTodayHoding_1, PNL_1, UseMargin_1,"00545")
16 'Call Order.HoldingInfoByCode2(Code, Market, BuyHoding_2, BuyCost_2, BuyTodayHoding_2, SellHoding_2, SellCost_2, SellTodayHoding_2, PNL_2, UseMargin_2,"01306")
17 'if round(BuyHoding_1*0.51)>BuyHoding_2 then order.Buy 1,round(BuyHoding_1*0.51)-BuyHoding_2,0,0,code,market,"01306",0
18 'if round(BuyHoding_1*0.51)<BuyHoding_2 then order.Sell 1,BuyHoding_2-round(BuyHoding_1*0.51),0,0,code,market,"01306",0
19 'if round(SellHoding_1*0.51)>SellHoding_2 then order.Buyshort 1,round(SellHoding_1*0.51)-SellHoding_2,0,0,code,market,"01306",0
20 'if round(SellHoding_1*0.51)<SellHoding_2 then order.sellshort 1,SellHoding_2-round(SellHoding_1*0.51),0,0,code,market,"01306",0
21 'end if
22 '
23
24 End Sub

原版代码~你们自己改一下帐号
我测试了我的调试机上没问题
实盘机器上不知道为啥有问题

调试机上是32位版本~win7操作系统
实盘机上也是32位版本~Windows Server 2003 企业版

[此贴子已经被作者于2015/6/15 11:19:51编辑过]
10楼
王锋 发表于:2015/6/15 11:20:23
你可以调试一下,在出现溢出的那一行代码上,将所有用到的变量都打印出来,怀疑是里面有无效值导致的计算溢出
共34 条记录, 每页显示 10 条, 页签: [1] [2][3][4]


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