|
@@ -3081,6 +3081,10 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
pnl_percent = pnl_data['pnl_percent']
|
|
pnl_percent = pnl_data['pnl_percent']
|
|
pnl_emoji = "🟢" if pnl >= 0 else "🔴"
|
|
pnl_emoji = "🟢" if pnl >= 0 else "🔴"
|
|
|
|
|
|
|
|
+ # Calculate ROE (Return on Equity) for partial close
|
|
|
|
+ cost_basis = amount * avg_entry
|
|
|
|
+ roe = (pnl / cost_basis) * 100 if cost_basis > 0 else 0
|
|
|
|
+
|
|
partial_value = amount * price
|
|
partial_value = amount * price
|
|
|
|
|
|
message = f"""
|
|
message = f"""
|
|
@@ -3096,7 +3100,7 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
{pnl_emoji} <b>Partial P&L:</b>
|
|
{pnl_emoji} <b>Partial P&L:</b>
|
|
• Entry Price: ${avg_entry:,.2f}
|
|
• Entry Price: ${avg_entry:,.2f}
|
|
• Exit Value: ${partial_value:,.2f}
|
|
• Exit Value: ${partial_value:,.2f}
|
|
-• P&L: ${pnl:,.2f} ({pnl_percent:+.2f}%)
|
|
|
|
|
|
+• P&L: ${pnl:,.2f} ({roe:+.2f}% ROE)
|
|
• Result: {"PROFIT" if pnl >= 0 else "LOSS"}
|
|
• Result: {"PROFIT" if pnl >= 0 else "LOSS"}
|
|
|
|
|
|
💰 <b>Position Status:</b>
|
|
💰 <b>Position Status:</b>
|
|
@@ -3119,6 +3123,10 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
pnl_percent = pnl_data['pnl_percent']
|
|
pnl_percent = pnl_data['pnl_percent']
|
|
pnl_emoji = "🟢" if pnl >= 0 else "🔴"
|
|
pnl_emoji = "🟢" if pnl >= 0 else "🔴"
|
|
|
|
|
|
|
|
+ # Calculate ROE (Return on Equity) for consistency
|
|
|
|
+ cost_basis = amount * avg_entry
|
|
|
|
+ roe = (pnl / cost_basis) * 100 if cost_basis > 0 else 0
|
|
|
|
+
|
|
entry_count = position.get('entry_count', 1)
|
|
entry_count = position.get('entry_count', 1)
|
|
exit_value = amount * price
|
|
exit_value = amount * price
|
|
|
|
|
|
@@ -3134,7 +3142,7 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
• Exit Value: ${exit_value:,.2f}
|
|
• Exit Value: ${exit_value:,.2f}
|
|
|
|
|
|
{pnl_emoji} <b>Total P&L:</b>
|
|
{pnl_emoji} <b>Total P&L:</b>
|
|
-• P&L: ${pnl:,.2f} ({pnl_percent:+.2f}%)
|
|
|
|
|
|
+• P&L: ${pnl:,.2f} ({roe:+.2f}% ROE)
|
|
• Result: {"PROFIT" if pnl >= 0 else "LOSS"}
|
|
• Result: {"PROFIT" if pnl >= 0 else "LOSS"}
|
|
• Entry Points Used: {entry_count}
|
|
• Entry Points Used: {entry_count}
|
|
|
|
|