From 4881c27c4462f497d1c7433ca32284aa3399ce00 Mon Sep 17 00:00:00 2001 From: tinkle-community Date: Thu, 23 Jul 2026 01:43:09 +0900 Subject: [PATCH] config: raise leverage 5x -> 10x, double book to 2 x 5x notional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator choice to add aggression while keeping the hold-for-big-moves design intact: - Leverage 5x -> 10x: a wide -5% stop is now -50% of margin — still survivable, not an instant liquidation (that needed 20x). - Per-position notional 2.5x -> 5x equity; 2 positions = 10x total account notional (full margin at 10x, ~10% liquidation cushion). - Stops/targets, throttle, min-hold and noise-band settings unchanged: same wide (-5% / +10-12%) exits, doubled exposure. Live strategy in data/data.db updated to match (lev=10, ratio=5.0). --- api/handler_user.go | 14 +++++++------- api/handler_user_default_strategy_test.go | 10 +++++----- kernel/engine_prompt_test.go | 4 ++-- store/strategy.go | 8 ++++---- web/src/pages/StrategyStudioPage.tsx | 12 ++++++------ 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/api/handler_user.go b/api/handler_user.go index 0b882439..5ccd2a73 100644 --- a/api/handler_user.go +++ b/api/handler_user.go @@ -263,13 +263,13 @@ func (s *Server) createDefaultStrategies(userID string, lang string) error { c.CoinSource.VergexMarketType = "all" c.CoinSource.VergexChain = "hyperliquid" c.RiskControl.MaxPositions = 2 - c.RiskControl.BTCETHMaxLeverage = 5 - c.RiskControl.AltcoinMaxLeverage = 5 - // Few, concentrated positions held for big moves. 5x leverage so a - // wide (-5%) stop is survivable rather than an instant liquidation; - // 2 positions × 2.5x = 5x total notional (full margin, ~20% cushion). - c.RiskControl.BTCETHMaxPositionValueRatio = 2.5 - c.RiskControl.AltcoinMaxPositionValueRatio = 2.5 + c.RiskControl.BTCETHMaxLeverage = 10 + c.RiskControl.AltcoinMaxLeverage = 10 + // Few, concentrated positions held for big moves. 10x leverage keeps a + // wide (-5%) stop survivable (~-50% margin, ~10% liquidation cushion); + // 2 positions × 5x = 10x total notional (full margin, doubled exposure). + c.RiskControl.BTCETHMaxPositionValueRatio = 5.0 + c.RiskControl.AltcoinMaxPositionValueRatio = 5.0 c.RiskControl.MaxMarginUsage = 1.0 c.RiskControl.MinConfidence = 78 c.RiskControl.MinRiskRewardRatio = 3.0 diff --git a/api/handler_user_default_strategy_test.go b/api/handler_user_default_strategy_test.go index 6c487bde..f4a8da5a 100644 --- a/api/handler_user_default_strategy_test.go +++ b/api/handler_user_default_strategy_test.go @@ -57,13 +57,13 @@ func TestCreateDefaultStrategiesUsesOneReadyToRunClaw402Preset(t *testing.T) { if trendCfg.CoinSource.UseAI500 || trendCfg.RiskControl.MaxPositions != 2 { t.Fatalf("default strategy should be Claw402/Vergex native with a 2-position concentrated book, got coin=%+v risk=%+v", trendCfg.CoinSource, trendCfg.RiskControl) } - if trendCfg.RiskControl.BTCETHMaxLeverage != 5 || trendCfg.RiskControl.AltcoinMaxLeverage != 5 { - t.Fatalf("default strategy should use 5x leverage for all Claw402 opens, got risk=%+v", trendCfg.RiskControl) + if trendCfg.RiskControl.BTCETHMaxLeverage != 10 || trendCfg.RiskControl.AltcoinMaxLeverage != 10 { + t.Fatalf("default strategy should use 10x leverage for all Claw402 opens, got risk=%+v", trendCfg.RiskControl) } - if trendCfg.RiskControl.BTCETHMaxPositionValueRatio != 2.5 || - trendCfg.RiskControl.AltcoinMaxPositionValueRatio != 2.5 || + if trendCfg.RiskControl.BTCETHMaxPositionValueRatio != 5.0 || + trendCfg.RiskControl.AltcoinMaxPositionValueRatio != 5.0 || trendCfg.RiskControl.MaxMarginUsage != 1.0 { - t.Fatalf("default strategy should size Claw402 opens at 2.5x equity notional (2 positions = 5x total at 5x), got risk=%+v", trendCfg.RiskControl) + t.Fatalf("default strategy should size Claw402 opens at 5x equity notional (2 positions = 10x total at 10x), got risk=%+v", trendCfg.RiskControl) } } diff --git a/kernel/engine_prompt_test.go b/kernel/engine_prompt_test.go index f963c448..d6e3a3d0 100644 --- a/kernel/engine_prompt_test.go +++ b/kernel/engine_prompt_test.go @@ -29,8 +29,8 @@ func TestBuildSystemPromptUsesVergexClaw402Prompt(t *testing.T) { if !strings.Contains(prompt, "Direction must be data-driven") { t.Fatalf("prompt should explain that direction is data-driven, not long-only:\n%s", prompt) } - if !strings.Contains(prompt, "every open position must use exactly 5x") { - t.Fatalf("prompt should force 5x leverage for Claw402 opens:\n%s", prompt) + if !strings.Contains(prompt, "every open position must use exactly 10x") { + t.Fatalf("prompt should force 10x leverage for Claw402 opens:\n%s", prompt) } if !strings.Contains(prompt, "use the full max notional per position") { t.Fatalf("prompt should force full-size Claw402 opens:\n%s", prompt) diff --git a/store/strategy.go b/store/strategy.go index 54db31ab..0ba1dd43 100644 --- a/store/strategy.go +++ b/store/strategy.go @@ -1015,10 +1015,10 @@ func GetDefaultStrategyConfig(lang string) StrategyConfig { }, RiskControl: RiskControlConfig{ MaxPositions: 2, // Few, concentrated positions held for big moves (CODE ENFORCED) - BTCETHMaxLeverage: 5, // Low leverage so a big (-5%) stop is survivable, not an instant liquidation - AltcoinMaxLeverage: 5, // Low leverage so a big (-5%) stop is survivable, not an instant liquidation - BTCETHMaxPositionValueRatio: 2.5, // Per-position notional = equity × 2.5; 2 positions = 5x total (full margin at 5x, ~20% liquidation cushion) - AltcoinMaxPositionValueRatio: 2.5, // Per-position notional = equity × 2.5; 2 positions = 5x total (full margin at 5x, ~20% liquidation cushion) + BTCETHMaxLeverage: 10, // Moderate leverage: a wide (-5%) stop is ~-50% margin, survivable, not an instant liquidation + AltcoinMaxLeverage: 10, // Moderate leverage: a wide (-5%) stop is ~-50% margin, survivable, not an instant liquidation + BTCETHMaxPositionValueRatio: 5.0, // Per-position notional = equity × 5; 2 positions = 10x total (full margin at 10x, ~10% liquidation cushion) + AltcoinMaxPositionValueRatio: 5.0, // Per-position notional = equity × 5; 2 positions = 10x total (full margin at 10x, ~10% liquidation cushion) MaxMarginUsage: 1.0, // Claw402 Autopilot intentionally uses full margin when opening MinPositionSize: 12, // Min 12 USDT per position (CODE ENFORCED) MinRiskRewardRatio: 3.0, // Min 3:1 profit/loss ratio (AI guided) diff --git a/web/src/pages/StrategyStudioPage.tsx b/web/src/pages/StrategyStudioPage.tsx index 09a9f1d4..12790aeb 100644 --- a/web/src/pages/StrategyStudioPage.tsx +++ b/web/src/pages/StrategyStudioPage.tsx @@ -1389,12 +1389,12 @@ export function StrategyStudioPage() { risk_control: defaultRisk({ ...base.ai_config?.risk_control, max_positions: 2, - btc_eth_max_leverage: 5, - altcoin_max_leverage: 5, - // Few, concentrated positions held for big moves. 5x leverage so a - // wide (-5%) stop is survivable; 2 positions × 2.5x = 5x total. - btc_eth_max_position_value_ratio: 2.5, - altcoin_max_position_value_ratio: 2.5, + btc_eth_max_leverage: 10, + altcoin_max_leverage: 10, + // Few, concentrated positions held for big moves. 10x leverage keeps a + // wide (-5%) stop survivable; 2 positions × 5x = 10x total. + btc_eth_max_position_value_ratio: 5, + altcoin_max_position_value_ratio: 5, max_margin_usage: 1.0, min_confidence: 78, min_risk_reward_ratio: 3,