diff --git a/src/notifier.py b/src/notifier.py index c46e2a6..34f429c 100644 --- a/src/notifier.py +++ b/src/notifier.py @@ -672,8 +672,8 @@ def _append_position_snapshot(lines: list[str], total_value: float | None) -> No def _row_line(r: tuple) -> str: sym, qty, avg, curr, mv, pnl = r pct = ((curr / avg - 1) * 100) if avg else 0 - sign = "+" if pnl >= 0 else "" - return f" {sym:<6} {sign}${pnl:>+8,.0f} ({sign}{pct:+.1f}%)" + sign = "+" if pnl >= 0 else "-" + return f" {sym:<6} {sign}${abs(pnl):>8,.0f} ({pct:+.1f}%)" # r[5] is positions.unrealized_pnl. SQLite allows NULL on that # column (broker race / stale snapshot can leave it unset for a