Fix composite margin ratio cap at 50% and add risk guide page with nav toggle.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -196,6 +196,10 @@
|
||||
}
|
||||
var marginPct = risk.margin_pct_used;
|
||||
var maxMarginPct = lim.max_margin_pct;
|
||||
var rollMaxPct = lim.roll_max_margin_pct;
|
||||
var isSingleMode = lim.position_mode === 'single'
|
||||
|| (maxPos != null && Number(maxPos) <= 1);
|
||||
var compositeCapLabel = isSingleMode ? '滚仓保证金上限' : '多仓保证金上限';
|
||||
|
||||
if (riskReasonEl) {
|
||||
var reason = st.reason || (enabled ? '可新开仓' : '风控已关闭');
|
||||
@@ -227,7 +231,7 @@
|
||||
{ label: '冷静剩余', value: fmtRemainSec(st.freeze_remaining_sec) },
|
||||
{
|
||||
label: '综合保证金占比',
|
||||
valueHtml: riskMarginPctHtml(marginPct, maxMarginPct),
|
||||
valueHtml: riskMarginPctHtml(marginPct, rollMaxPct),
|
||||
},
|
||||
{
|
||||
label: '单仓保证金上限',
|
||||
@@ -235,8 +239,8 @@
|
||||
valueClass: 'risk-cap-single',
|
||||
},
|
||||
{
|
||||
label: '综合保证金上限',
|
||||
value: lim.roll_max_margin_pct != null ? fmtNum(lim.roll_max_margin_pct) + '%' : '—',
|
||||
label: compositeCapLabel,
|
||||
value: rollMaxPct != null ? fmtNum(rollMaxPct) + '%' : '—',
|
||||
valueClass: 'risk-cap-roll',
|
||||
},
|
||||
{ label: '计仓模式', value: sizingDetail },
|
||||
|
||||
Reference in New Issue
Block a user