forked from kodorvan/stcs
Fixed martingale step
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user