fix: показывать размер и стоп позиции в /status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
anor
2026-03-09 06:34:45 +10:00
co-authored by Claude Opus 4.6
parent 4317b175d4
commit 0f6272f37a
+4 -1
View File
@@ -65,7 +65,10 @@ def format_status_report(cfg, conn) -> str:
pos = get_open_position(conn, a["ticker"])
if pos:
d = "LONG" if pos["direction"] == 1 else "SHORT"
open_positions.append(f" {a['ticker']}: {d} @ ${pos['entry_price']:,.2f}")
pv = pos["pos_value"]
stop = pos["stop_price"]
open_positions.append(f" {a['ticker']}: {d} @ ${pos['entry_price']:,.2f} "
f"(${pv:,.2f}, stop ${stop:,.2f})")
total_pnl = total_equity - total_initial
total_pct = (total_equity / total_initial - 1) * 100 if total_initial > 0 else 0