mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-11 14:56:57 +08:00
fix(trader): get peakPnlPct using posKey (#955)
Co-authored-by: zbhan <zbhan@freewheel.tv>
This commit is contained in:
@@ -651,7 +651,7 @@ func (at *AutoTrader) buildTradingContext() (*decision.Context, error) {
|
||||
|
||||
// 获取该持仓的历史最高收益率
|
||||
at.peakPnLCacheMutex.RLock()
|
||||
peakPnlPct := at.peakPnLCache[symbol]
|
||||
peakPnlPct := at.peakPnLCache[posKey]
|
||||
at.peakPnLCacheMutex.RUnlock()
|
||||
|
||||
positionInfos = append(positionInfos, decision.PositionInfo{
|
||||
|
||||
Reference in New Issue
Block a user