修复vn.trader里CTP接口对上期所品种的昨仓计算,修改后显示的昨仓代表的是目前尚未平掉的昨日仓位,感谢社区andrew361x的贡献!

This commit is contained in:
chenxy123 2016-04-26 21:41:21 +08:00
parent cfcf5959be
commit e68afab909

View File

@ -655,11 +655,8 @@ class CtpTdApi(TdApi):
pos.frozen = data['ShortFrozen']
# 持仓量
if data['Position']:
pos.position = data['Position']
if data['YdPosition']:
pos.ydPosition = data['YdPosition']
pos.position = data['Position']
pos.ydPosition = data['Position'] - data['TodayPosition']
# 持仓均价
if pos.position: