diff --git a/trader.go b/trader.go index fd3e9f9..ef1fc23 100644 --- a/trader.go +++ b/trader.go @@ -454,6 +454,12 @@ func (t *Trader) checkExit(pos *ArbPosition, bgP, hlP, diffPct float64, notifier exitReason = "价差收敛,止盈平仓" } + // Stop-loss: spread reversed (went negative) + if diffPct < -0.02 { + shouldExit = true + exitReason = "价差反转,止损平仓" + } + if elapsed > 30*time.Minute { shouldExit = true exitReason = "超时平仓"