Fix recovery positions

This commit is contained in:
2025-11-19 21:06:02 +07:00
parent e1f2f75c23
commit c7adb687b8

View File

@@ -2957,6 +2957,7 @@ public class TradingBotBase : ITradingBot
// Mark recovery as attempted before proceeding // Mark recovery as attempted before proceeding
lastPosition.RecoveryAttempted = true; lastPosition.RecoveryAttempted = true;
Positions[lastPosition.Identifier] = lastPosition;
// Attempt recovery for the last position only // Attempt recovery for the last position only
bool recovered = await RecoverOpenPositionFromBroker(signal, lastPosition); bool recovered = await RecoverOpenPositionFromBroker(signal, lastPosition);
@@ -2988,7 +2989,7 @@ public class TradingBotBase : ITradingBot
try try
{ {
await LogWarning( await LogDebug(
$"🔄 Attempting Position Recovery\n" + $"🔄 Attempting Position Recovery\n" +
$"Signal: `{signal.Identifier}`\n" + $"Signal: `{signal.Identifier}`\n" +
$"Position: `{positionForSignal.Identifier}`\n" + $"Position: `{positionForSignal.Identifier}`\n" +