修复清算空头平仓交易时,交易结果方向错误的问题
This commit is contained in:
parent
c363438b9d
commit
377beb9d82
@ -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)
|
||||
|
||||
# 计算未清算部分
|
||||
|
Loading…
Reference in New Issue
Block a user