fix: 移除多余的netPnl和反转检查, 收敛即退出(0.02%)
This commit is contained in:
@@ -534,19 +534,12 @@ func (t *Trader) checkExit(pos *ArbPosition, bgP, hlP, diffPct float64, notifier
|
||||
exitReason = "利润止盈"
|
||||
}
|
||||
|
||||
// Convergence exit: spread narrowed significantly and we're profitable
|
||||
// Prevents positions from sitting at near-zero spread waiting for timeout
|
||||
if diffPct <= 0.02 && netPnl > 0 {
|
||||
// Convergence exit: spread narrowed to ≤ 0.02% (includes reversal)
|
||||
if diffPct <= 0.02 {
|
||||
shouldExit = true
|
||||
exitReason = "价差收敛止盈"
|
||||
}
|
||||
|
||||
// Emergency reversal: spread flipped negative — cut losses
|
||||
if diffPct < 0 {
|
||||
shouldExit = true
|
||||
exitReason = "价差反转平仓"
|
||||
}
|
||||
|
||||
// Timeout: configured max hold time
|
||||
if elapsed > t.cfg.PositionTimeout {
|
||||
shouldExit = true
|
||||
|
||||
Reference in New Issue
Block a user