`;
}
let tpslPending = null;
let lastMonitorRows = [];
@@ -864,6 +864,26 @@
return null;
}
+ function resolveTpProfitUsdt(mo, pos) {
+ const m = mo || {};
+ const p = pos || {};
+ const raw =
+ m.reward_at_tp_usdt != null && m.reward_at_tp_usdt !== ""
+ ? m.reward_at_tp_usdt
+ : p.reward_at_tp_usdt != null && p.reward_at_tp_usdt !== ""
+ ? p.reward_at_tp_usdt
+ : null;
+ if (raw == null || raw === "") return null;
+ const n = Number(raw);
+ return Number.isFinite(n) ? n : null;
+ }
+
+ function formatTpProfitCell(mo, pos) {
+ const n = resolveTpProfitUsdt(mo, pos);
+ if (n == null) return "—";
+ return `${fmt(n, 2)}U`;
+ }
+
function formatMonitorRiskMeta(mo, trendPlan) {
const m = mo || {};
const t = trendPlan || {};
@@ -3155,7 +3175,8 @@
止损${sl != null && sl !== "" ? fmtSymbolPrice(sl, symbol, tickMap) : "—"}
止盈${formatTpCellValue(tp, tpMonitored, symbol, tickMap)}
盈亏比${rr != null ? fmt(rr, 2) + ":1" : "—"}
- 张数${fmt(pos.contracts, 4)}
+ 张数${fmt(pos.contracts, 2)}
+ 盈利金额${formatTpProfitCell(mo, pos)}
${
showAccountPnlPref()
? `浮盈亏${pnlText}
`
@@ -3308,12 +3329,14 @@
const pnlTd = showAccountPnlPref()
? `${fmt(x.unrealized_pnl, 2)} | `
: "";
+ const tpProfitTd = `${formatTpProfitCell(monitorOrder, x)} | `;
return `
| ${tcBadge}${fcBadge}${symBeBadge} |
${renderDirectionHtml(x.side)} |
${fmtEntryPrice(x, tickMap)} |
${fmtMarkPrice(x, tickMap)} |
- ${fmt(x.contracts, 4)} |
+ ${fmt(x.contracts, 2)} |
+ ${tpProfitTd}
${pnlTd}
${actionCell} |
`;
@@ -3499,7 +3522,7 @@
${p.idx_px != null ? fmt(p.idx_px, 0) : "—"} |
${p.expiry_be_px != null ? fmt(p.expiry_be_px, 0) : "—"} |
${p.close_be_px != null ? fmt(p.close_be_px, 0) : "—"} |
- ${fmt(p.upl, 4)} |
+ ${fmt(p.upl, 2)} |
${p.upl_ratio_pct != null ? esc(p.upl_ratio_pct) + "%" : "—"} |
`;
});
diff --git a/manual_trading_hub/static/index.html b/manual_trading_hub/static/index.html
index 343dd30..f1d3bc0 100644
--- a/manual_trading_hub/static/index.html
+++ b/manual_trading_hub/static/index.html
@@ -1152,6 +1152,6 @@
-
+