Fix breakeven badge still showing after roll lowers stop loss.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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"]),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user