From cef807331467cc753ef7f0ae6c83a3673d0a49d4 Mon Sep 17 00:00:00 2001 From: cryptooda Date: Wed, 26 Nov 2025 10:38:24 +0700 Subject: [PATCH] Remove comments --- src/Managing.Application/Bots/TradingBotBase.cs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/Managing.Application/Bots/TradingBotBase.cs b/src/Managing.Application/Bots/TradingBotBase.cs index b66a5f60..56af15b1 100644 --- a/src/Managing.Application/Bots/TradingBotBase.cs +++ b/src/Managing.Application/Bots/TradingBotBase.cs @@ -73,10 +73,7 @@ public class TradingBotBase : ITradingBot // Start async initialization in the background without blocking try { - // Load account asynchronously await LoadAccount(); - - // Load last candle asynchronously await LoadLastCandle(); if (Account == null) @@ -85,16 +82,12 @@ public class TradingBotBase : ITradingBot throw new ArgumentException("Account not found"); } - // Cancel orders - // await CancelAllOrders(); - - // Send startup message only for fresh starts (not reboots) switch (previousStatus) { case BotStatus.Saved: var indicatorNames = Config.Scenario.Indicators.Select(i => i.Type.ToString()).ToList(); var modeText = Config.IsForWatchingOnly ? "Watch Only" : - Config.IsForCopyTrading ? "Copy Trading" : "Live Trading"; + Config.IsForCopyTrading ? "Copy Trading" : "Live Trading"; var startupMessage = $"🚀 Bot Started Successfully\n\n" + $"📊 Trading Setup:\n" + @@ -103,7 +96,9 @@ public class TradingBotBase : ITradingBot $"🎮 Scenario: `{Config.Scenario?.Name ?? "Unknown"}`\n" + $"💰 Balance: `${Config.BotTradingBalance:F2}`\n" + $"👀 Mode: `{modeText}`\n\n" + - (Config.IsForCopyTrading ? "" : $"📈 Active Indicators: `{string.Join(", ", indicatorNames)}`\n\n") + + (Config.IsForCopyTrading + ? "" + : $"📈 Active Indicators: `{string.Join(", ", indicatorNames)}`\n\n") + $"✅ Ready to monitor signals and execute trades\n" + $"📢 Notifications will be sent when positions are triggered"; @@ -255,7 +250,8 @@ public class TradingBotBase : ITradingBot Logger.LogInformation( "[{CopyTrading}][{AgentName}] Bot Status {Name} - ServerDate: {ServerDate}, LastCandleDate: {LastCandleDate}, Signals: {SignalCount}, Executions: {ExecutionCount}, Positions: {PositionCount}", - Config.IsForCopyTrading ? "CopyTrading" : "LiveTrading", Account.User.AgentName, Config.Name, DateTime.UtcNow, LastCandle?.Date, Signals.Count, ExecutionCount, Positions.Count); + Config.IsForCopyTrading ? "CopyTrading" : "LiveTrading", Account.User.AgentName, Config.Name, + DateTime.UtcNow, LastCandle?.Date, Signals.Count, ExecutionCount, Positions.Count); Logger.LogInformation("[{AgentName}] Internal Positions : {Position}", Account.User.AgentName, string.Join(", ",