diff --git a/frontend/trading.html b/frontend/trading.html
index 4d703df..716487e 100644
--- a/frontend/trading.html
+++ b/frontend/trading.html
@@ -330,16 +330,16 @@
{{ order.is_long ? '做多' : '做空' }}
-
{{ order.quantity.toFixed(4) }} |
- ${{ order.entry_price.toFixed(2) }} |
- ${{ order.current_price ? order.current_price.toFixed(2) : '-' }} |
- {{ order.leverage }}x |
- ${{ order.margin.toFixed(2) }} |
+ {{ order.quantity ? order.quantity.toFixed(4) : '0.0000' }} |
+ {{ order.entry_price ? '$' + order.entry_price.toFixed(2) : '$0.00' }} |
+ {{ order.current_price ? '$' + order.current_price.toFixed(2) : '-' }} |
+ {{ order.leverage || 0 }}x |
+ {{ order.margin ? '$' + order.margin.toFixed(2) : '$0.00' }} |
- {{ order.unrealized_pnl >= 0 ? '+' : '' }}${{ order.unrealized_pnl.toFixed(2) }}
+ {{ order.unrealized_pnl >= 0 ? '+' : '' }}${{ order.unrealized_pnl ? order.unrealized_pnl.toFixed(2) : '0.00' }}
|
- {{ order.pnl_percent >= 0 ? '+' : '' }}{{ order.pnl_percent.toFixed(2) }}%
+ {{ order.pnl_percent >= 0 ? '+' : '' }}{{ order.pnl_percent ? order.pnl_percent.toFixed(2) : '0.00' }}%
|
@@ -373,9 +373,9 @@
{{ order.is_long ? '做多' : '做空' }}
|
- {{ order.quantity.toFixed(4) }} |
- ${{ order.entry_price.toFixed(2) }} |
- {{ order.leverage }}x |
+ {{ order.quantity ? order.quantity.toFixed(4) : '0.0000' }} |
+ {{ order.entry_price ? '$' + order.entry_price.toFixed(2) : '$0.00' }} |
+ {{ order.leverage || 0 }}x |
{{ order.stop_loss ? '$' + order.stop_loss.toFixed(2) : '-' }} |
{{ order.take_profit ? '$' + order.take_profit.toFixed(2) : '-' }} |
{{ formatTime(order.created_at) }} |
@@ -411,14 +411,14 @@
{{ order.is_long ? '做多' : '做空' }}
- {{ order.quantity.toFixed(4) }} |
- ${{ order.entry_price.toFixed(2) }} |
- ${{ order.exit_price.toFixed(2) }} |
+ {{ order.quantity ? order.quantity.toFixed(4) : '0.0000' }} |
+ {{ order.entry_price ? '$' + order.entry_price.toFixed(2) : '$0.00' }} |
+ {{ order.exit_price ? '$' + order.exit_price.toFixed(2) : '$0.00' }} |
- {{ order.realized_pnl >= 0 ? '+' : '' }}${{ order.realized_pnl.toFixed(2) }}
+ {{ order.realized_pnl >= 0 ? '+' : '' }}${{ order.realized_pnl ? order.realized_pnl.toFixed(2) : '0.00' }}
|
- {{ order.pnl_percent >= 0 ? '+' : '' }}{{ order.pnl_percent.toFixed(2) }}%
+ {{ order.pnl_percent >= 0 ? '+' : '' }}{{ order.pnl_percent ? order.pnl_percent.toFixed(2) : '0.00' }}%
|
{{ getCloseReason(order.close_reason) }} |
{{ formatTime(order.closed_at) }} |
@@ -500,6 +500,7 @@
losing_trades: 0,
win_rate: 0,
total_pnl: 0,
+ total_pnl_percent: 0,
average_win: 0,
average_loss: 0,
profit_factor: 0,