Fix breakeven badge still showing after roll lowers stop loss.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-10 16:52:29 +08:00
parent edfe935fb4
commit 02472f19cb
10 changed files with 161 additions and 17 deletions
+3 -1
View File
@@ -459,7 +459,9 @@ def _execute_pending_roll_leg(
except Exception:
pass
conn.execute(
"UPDATE order_monitors SET stop_loss=?, order_amount=? WHERE id=? AND status='active'",
"""UPDATE order_monitors SET stop_loss=?, order_amount=?,
breakeven_armed=0, breakeven_price=NULL
WHERE id=? AND status='active'""",
(sl, live_qty, mon["id"]),
)