修复清算空头平仓交易时,交易结果方向错误的问题

This commit is contained in:
chenxy123 2016-07-31 22:28:50 +08:00
parent c363438b9d
commit 377beb9d82

View File

@ -517,7 +517,7 @@ class BacktestingEngine(object):
closedVolume = min(exitTrade.volume, entryTrade.volume)
result = TradingResult(entryTrade.price, entryTrade.dt,
exitTrade.price, exitTrade.dt,
-closedVolume, self.rate, self.slippage, self.size)
closedVolume, self.rate, self.slippage, self.size)
resultList.append(result)
# 计算未清算部分