Stage 07.4.3.10 — Risk and position control

This commit is contained in:
2026-05-05 11:26:46 +03:00
parent 8dd6298712
commit 163e8efe82
5 changed files with 440 additions and 9 deletions

View File

@@ -376,6 +376,8 @@ class AutoTradeRunner:
exit_price = cls._format_price(payload.get("exit_price"))
size = cls._format_size(payload.get("size"))
pnl = cls._format_pnl(payload.get("pnl"))
risk_reason = payload.get("risk_reason")
risk_line = f"\nRisk: {risk_reason}" if risk_reason else ""
return (
f"<b>✅ Paper position closed</b>\n\n"
@@ -384,6 +386,7 @@ class AutoTradeRunner:
f"Exit: $ {exit_price}\n"
f"Size: {size}\n\n"
f"PnL: {pnl}"
f"{risk_line}"
)
if event_type == "paper_position_flipped":