2
0
forked from kodorvan/stcs

adjusted profit

This commit is contained in:
algizn97
2025-10-26 19:11:37 +05:00
parent 62e923cefa
commit 92bb052151

View File

@@ -159,7 +159,7 @@ class TelegramMessageHandler:
if safe_float(closed_size) == 0: if safe_float(closed_size) == 0:
text += f"Движение: {side_rus}\n" text += f"Движение: {side_rus}\n"
else: else:
text += f"\nРеализованная прибыль: {total_pnl:.7f}\n" text += f"\nРеализованная прибыль: {exec_pnl:.7f}\n"
await self.telegram_bot.send_message( await self.telegram_bot.send_message(
chat_id=tg_id, text=text, reply_markup=kbi.profile_bybit chat_id=tg_id, text=text, reply_markup=kbi.profile_bybit
@@ -172,8 +172,8 @@ class TelegramMessageHandler:
and safe_float(closed_size) > 0 and safe_float(closed_size) > 0
and user_symbols is not None and user_symbols is not None
): ):
if safe_float(total_pnl) > 0: if safe_float(exec_pnl) > 0:
profit_text = "📈 Прибыль достигнута. Начинаем новую серию с базовой ставки\n" profit_text = "📈 Начинаю новую серию с базовой ставки\n"
await self.telegram_bot.send_message( await self.telegram_bot.send_message(
chat_id=tg_id, text=profit_text, reply_markup=kbi.profile_bybit chat_id=tg_id, text=profit_text, reply_markup=kbi.profile_bybit
) )
@@ -225,7 +225,7 @@ class TelegramMessageHandler:
reply_markup=kbi.profile_bybit, reply_markup=kbi.profile_bybit,
) )
else: else:
open_order_text = "\n❗️ Сделка закрылась в минус, открываю новую сделку с увеличенной ставкой.\n" open_order_text = "\n❗️ Открываю новую сделку с увеличенной ставкой.\n"
await self.telegram_bot.send_message( await self.telegram_bot.send_message(
chat_id=tg_id, text=open_order_text chat_id=tg_id, text=open_order_text
) )