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:
@@ -322,6 +322,27 @@ export type PlanState = {
|
||||
liquidity_ok?: boolean;
|
||||
liquidity_detail?: string | null;
|
||||
}[];
|
||||
risk_perp_unit?: number;
|
||||
risk_option_unit?: number;
|
||||
risk_exit_unit?: number;
|
||||
risk_last_k?: number | null;
|
||||
risk_sizing_preview?: {
|
||||
ok?: boolean;
|
||||
locked?: boolean;
|
||||
detail?: string;
|
||||
budget?: number;
|
||||
k?: number;
|
||||
[key: string]: unknown;
|
||||
};
|
||||
risk_sizing_locked?: boolean;
|
||||
martingale_enabled?: boolean;
|
||||
martingale_eligible?: boolean;
|
||||
martingale_doubles?: number;
|
||||
martingale_loss_days?: number;
|
||||
risk_effective_loss_pct?: number;
|
||||
risk_loss_pct?: number;
|
||||
sizing_mode?: "manual" | "risk_based";
|
||||
risk_based?: boolean;
|
||||
ledger: { equity: number; available: number; reserved: number };
|
||||
mode?: "SIM" | "LIVE";
|
||||
sim?: boolean;
|
||||
@@ -364,6 +385,9 @@ export type StrategySettings = {
|
||||
risk_option_unit?: number;
|
||||
risk_exit_unit?: number;
|
||||
risk_sizing_preview?: Record<string, unknown>;
|
||||
martingale_enabled?: boolean;
|
||||
martingale_start_after_loss_days?: number;
|
||||
martingale_max_doubles?: number;
|
||||
exchange?: string;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user