From d40ee7a86e7115b9d4445af9b17a34a51407df44 Mon Sep 17 00:00:00 2001 From: cryptooda Date: Thu, 17 Jul 2025 16:59:46 +0700 Subject: [PATCH] Reduce timelimit message for open position --- src/Managing.Application/Bots/TradingBot.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Managing.Application/Bots/TradingBot.cs b/src/Managing.Application/Bots/TradingBot.cs index a55a01e..6401b60 100644 --- a/src/Managing.Application/Bots/TradingBot.cs +++ b/src/Managing.Application/Bots/TradingBot.cs @@ -676,8 +676,12 @@ public class TradingBot : Bot, ITradingBot } else { - await LogInformation( - $"ā³ **Time Limit - Waiting**\nTime limit exceeded but position at loss\nšŸ“‰ Entry: `${positionForSignal.Open.Price}` → Current: `${lastCandle.Close}`\nšŸ’° Realized PNL: `${currentPnl:F2}` (`{pnlPercentage:F2}%`\nšŸŽÆ Waiting for profit before closing (CloseEarlyWhenProfitable enabled)"); + // Only send this message every 10 executions to avoid spam + if (ExecutionCount % 10 == 0) + { + await LogInformation( + $"ā³ **Time Limit - Waiting**\nTime limit exceeded but position at loss\nšŸ“‰ Entry: `${positionForSignal.Open.Price}` → Current: `${lastCandle.Close}`\nšŸ’° Realized PNL: `${currentPnl:F2}` (`{pnlPercentage:F2}%`)\nšŸŽÆ Waiting for profit before closing (CloseEarlyWhenProfitable enabled)\nšŸ“Š Message sent every 10 executions to reduce spam"); + } } }