diff --git a/lib/trading/position-manager.ts b/lib/trading/position-manager.ts index 132401a..9edebe8 100644 --- a/lib/trading/position-manager.ts +++ b/lib/trading/position-manager.ts @@ -792,6 +792,13 @@ export class PositionManager { await this.saveTradeState(trade) } + // CRITICAL: Check stop loss for runner (after TP1, before TP2) + if (trade.tp1Hit && !trade.tp2Hit && this.shouldStopLoss(currentPrice, trade)) { + console.log(`🔴 RUNNER STOP LOSS: ${trade.symbol} at ${profitPercent.toFixed(2)}% (profit lock triggered)`) + await this.executeExit(trade, 100, 'SL', currentPrice) + return + } + // 5. Take profit 2 (remaining position) if (trade.tp1Hit && !trade.tp2Hit && this.shouldTakeProfit2(currentPrice, trade)) { console.log(`🎊 TP2 HIT: ${trade.symbol} at ${profitPercent.toFixed(2)}%`)