fix: показывать размер и стоп позиции в /status
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user