From 940c0b51e7b2ef4169441c744a577d577ef78e00 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Fri, 16 Feb 2018 21:12:15 +0800 Subject: [PATCH] [Fix]Close #738 --- README.md | 2 ++ vnpy/trader/vtEngine.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d6c8d99a..c37babe6 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,8 @@ vn.py是基于Python的开源量化交易程序开发框架,起源于国内私 - OANDA(oanda) + - 福汇(fxcm) + - OKCOIN(okcoin) - 火币(huobi) diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index ad0745dc..86168da3 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -1053,9 +1053,9 @@ class PositionDetail(object): if ydAvailable > 0: reqClose = copy(req) if self.exchange is EXCHANGE_SHFE: - req.offset = OFFSET_CLOSEYESTERDAY + reqClose.offset = OFFSET_CLOSEYESTERDAY else: - req.offset = OFFSET_CLOSE + reqClose.offset = OFFSET_CLOSE reqClose.volume = ydAvailable l.append(reqClose)