diff --git a/vnpy/trader/app/ctaStrategy/language/__init__.py b/vnpy/trader/app/ctaStrategy/language/__init__.py index a058945f..f5c4ca18 100644 --- a/vnpy/trader/app/ctaStrategy/language/__init__.py +++ b/vnpy/trader/app/ctaStrategy/language/__init__.py @@ -5,7 +5,7 @@ import os import traceback # 默认设置 -from chinese import text +from .chinese import text # 是否要使用英文 from vnpy.trader.vtGlobal import globalSetting diff --git a/vnpy/trader/app/riskManager/__init__.py b/vnpy/trader/app/riskManager/__init__.py index c58c8c61..04e66bc5 100644 --- a/vnpy/trader/app/riskManager/__init__.py +++ b/vnpy/trader/app/riskManager/__init__.py @@ -1,7 +1,7 @@ # encoding: UTF-8 -from rmEngine import RmEngine -from uiRmWidget import RmEngineManager +from .rmEngine import RmEngine +from .uiRmWidget import RmEngineManager appName = 'RiskManager' appDisplayName = u'风险管理' diff --git a/vnpy/trader/app/riskManager/language/__init__.py b/vnpy/trader/app/riskManager/language/__init__.py index a058945f..f5c4ca18 100644 --- a/vnpy/trader/app/riskManager/language/__init__.py +++ b/vnpy/trader/app/riskManager/language/__init__.py @@ -5,7 +5,7 @@ import os import traceback # 默认设置 -from chinese import text +from .chinese import text # 是否要使用英文 from vnpy.trader.vtGlobal import globalSetting diff --git a/vnpy/trader/gateway/futuGateway/__init__.py b/vnpy/trader/gateway/futuGateway/__init__.py index 0b477e7f..827c2b6c 100644 --- a/vnpy/trader/gateway/futuGateway/__init__.py +++ b/vnpy/trader/gateway/futuGateway/__init__.py @@ -1,7 +1,7 @@ # encoding: UTF-8 from vnpy.trader import vtConstant -from futuGateway import FutuGateway +from .futuGateway import FutuGateway gatewayClass = FutuGateway gatewayName = 'FUTU' diff --git a/vnpy/trader/gateway/futuGateway/futuGateway.py b/vnpy/trader/gateway/futuGateway/futuGateway.py index 63f5ba3c..d557abcb 100644 --- a/vnpy/trader/gateway/futuGateway/futuGateway.py +++ b/vnpy/trader/gateway/futuGateway/futuGateway.py @@ -12,10 +12,14 @@ from datetime import datetime from copy import copy import futuquant as ft -from futuquant.open_context import (RET_ERROR, RET_OK, PriceRegularMode, - StockQuoteHandlerBase, OrderBookHandlerBase, - USTradeOrderHandlerBase, USTradeDealHandlerBase, - HKTradeOrderHandlerBase, HKTradeDealHandlerBase) +from futuquant import (RET_ERROR, RET_OK, PriceRegularMode, + StockQuoteHandlerBase, OrderBookHandlerBase, + TradeOrderHandlerBase, TradeDealHandlerBase) + +#from futuquant.open_context import (RET_ERROR, RET_OK, PriceRegularMode, + #StockQuoteHandlerBase, OrderBookHandlerBase, + #USTradeOrderHandlerBase, USTradeDealHandlerBase, + #HKTradeOrderHandlerBase, HKTradeDealHandlerBase) from vnpy.trader.vtGateway import * from vnpy.trader.vtConstant import GATEWAYTYPE_INTERNATIONAL diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index cfd1c5f1..75584a1f 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -872,8 +872,6 @@ class PositionDetail(object): self.shortPnl = pos.positionProfit self.shortPrice = pos.price - #self.output() - #---------------------------------------------------------------------- def updateOrderReq(self, req, vtOrderID): """发单更新""" @@ -986,15 +984,6 @@ class PositionDetail(object): self.longPosFrozen = self.longYdFrozen + self.longTdFrozen self.shortPosFrozen = self.shortYdFrozen + self.shortTdFrozen - #---------------------------------------------------------------------- - def output(self): - """""" - print self.vtSymbol, '-'*30 - print 'long, total:%s, td:%s, yd:%s' %(self.longPos, self.longTd, self.longYd) - print 'long frozen, total:%s, td:%s, yd:%s' %(self.longPosFrozen, self.longTdFrozen, self.longYdFrozen) - print 'short, total:%s, td:%s, yd:%s' %(self.shortPos, self.shortTd, self.shortYd) - print 'short frozen, total:%s, td:%s, yd:%s' %(self.shortPosFrozen, self.shortTdFrozen, self.shortYdFrozen) - #---------------------------------------------------------------------- def convertOrderReq(self, req): """转换委托请求"""