Add martingale mode for risk-based percent sizing.
Enable in settings (default off): after N consecutive loss days, double the effective risk_loss_pct up to a configurable max; blocked when base pct > 3%. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -223,6 +223,13 @@ export default function PlanPage() {
|
||||
: plan?.risk_sizing_preview?.budget != null
|
||||
? `预算${fmt(plan.risk_sizing_preview.budget, 2)}U`
|
||||
: null,
|
||||
plan?.martingale_enabled &&
|
||||
(plan?.martingale_doubles ?? 0) > 0 &&
|
||||
!riskLocked
|
||||
? `倍投×${2 ** Number(plan.martingale_doubles)}(${fmt(plan.risk_effective_loss_pct ?? plan.risk_loss_pct ?? 0, 2)}%)`
|
||||
: plan?.martingale_enabled && !riskLocked
|
||||
? "倍投开"
|
||||
: null,
|
||||
!riskLocked && plan?.risk_sizing_preview?.ok === false
|
||||
? String(plan.risk_sizing_preview.detail || "预览失败")
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user