2
0
forked from kodorvan/stcs

Fixed martingale step

This commit is contained in:
algizn97
2025-09-11 12:50:43 +05:00
parent da16a267e4
commit b3119c6ee1
4 changed files with 7 additions and 4 deletions

View File

@@ -262,6 +262,9 @@ async def handle_execution_message(message, msg):
float(martingale_factor) ** current_martingale_step
)
await rq.update_martingale_step(tg_id, current_martingale)
await message.answer(
f"❗️ Сделка закрылась в минус, открываю новую сделку с увеличенной ставкой.\n"
)
await open_position(
tg_id,
message,
@@ -391,7 +394,7 @@ async def open_position(
await error_max_risk(message)
return
if max_martingale_steps == current_martingale:
if max_martingale_steps < current_martingale:
await error_max_step(message)
return

View File

@@ -483,7 +483,7 @@ async def reset_martingale(callback: CallbackQuery) -> None:
Сбрасывает шаги мартингейла пользователя.
"""
tg_id = callback.from_user.id
await rq.update_martingale_step(tg_id, 0)
await rq.update_martingale_step(tg_id, 1)
await callback.answer("Сброс шагов выполнен.")
await main_settings_message(tg_id, callback.message)