diff --git a/src/Managing.Application/Bots/Grains/BacktestTradingBotGrain.cs b/src/Managing.Application/Bots/Grains/BacktestTradingBotGrain.cs index e749e846..20367cd5 100644 --- a/src/Managing.Application/Bots/Grains/BacktestTradingBotGrain.cs +++ b/src/Managing.Application/Bots/Grains/BacktestTradingBotGrain.cs @@ -73,8 +73,8 @@ public class BacktestTradingBotGrain : Grain, IBacktestTradingBotGrain var currentCandle = 0; var lastLoggedPercentage = 0; - _logger.LogInformation("Starting backtest with {TotalCandles} candles for {Ticker} on {Timeframe}", - totalCandles, config.Ticker, config.Timeframe); + _logger.LogInformation("Backtest requested by {userId} with {TotalCandles} candles for {Ticker} on {Timeframe}", + user.Id, totalCandles, config.Ticker, config.Timeframe); // Initialize wallet balance with first candle tradingBot.WalletBalances.Clear(); @@ -98,7 +98,8 @@ public class BacktestTradingBotGrain : Grain, IBacktestTradingBotGrain if (currentPercentage >= lastLoggedPercentage + 10) { lastLoggedPercentage = currentPercentage; - _logger.LogInformation("Backtest progress: {Percentage}% ({CurrentCandle}/{TotalCandles} candles processed)", + _logger.LogInformation( + "Backtest progress: {Percentage}% ({CurrentCandle}/{TotalCandles} candles processed)", currentPercentage, currentCandle, totalCandles); } @@ -108,7 +109,8 @@ public class BacktestTradingBotGrain : Grain, IBacktestTradingBotGrain { _logger.LogWarning( "Backtest stopped early: Wallet balance fell below {MinimumPositionAmount} USDC (Current: {CurrentBalance:F2} USDC) at candle {CurrentCandle}/{TotalCandles} from {CandleDate}", - Constants.GMX.Config.MinimumPositionAmount, currentWalletBalance, currentCandle, totalCandles, candle.Date.ToString("yyyy-MM-dd HH:mm")); + Constants.GMX.Config.MinimumPositionAmount, currentWalletBalance, currentCandle, totalCandles, + candle.Date.ToString("yyyy-MM-dd HH:mm")); break; } }