mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-13 15:57:01 +08:00
feat: autopilot book to 4 positions x 5x notional at 20x leverage
Was 2 positions x ~equity×1.2 — too few holdings and no room for shorts (the 2 slots filled with the strongest signals, which were long-leaning, so the balanced candidate pool never got expressed as short trades). Now: max 4 positions, each sized at equity×5 notional, 20x leverage. Four positions × 5x = 20x total account notional = full margin at 20x — the operator's requested ceiling. This gives room for ~2 long + 2 short and bigger single positions; the existing direction-balanced candidate selection plus long/short coverage fills both sides when strong bearish signals exist. Applied across all three config sources (default template, quick-create preset, studio unified) with matching test assertions and 20x prompt copy.
This commit is contained in:
@@ -262,13 +262,14 @@ func (s *Server) createDefaultStrategies(userID string, lang string) error {
|
||||
c.CoinSource.VergexLimit = 10
|
||||
c.CoinSource.VergexMarketType = "all"
|
||||
c.CoinSource.VergexChain = "hyperliquid"
|
||||
c.RiskControl.MaxPositions = 2
|
||||
c.RiskControl.BTCETHMaxLeverage = 10
|
||||
c.RiskControl.AltcoinMaxLeverage = 10
|
||||
// 4× equity notional per position: at 10x leverage two full positions
|
||||
// use ~80% of margin — concentrated but solvent.
|
||||
c.RiskControl.BTCETHMaxPositionValueRatio = 4.0
|
||||
c.RiskControl.AltcoinMaxPositionValueRatio = 4.0
|
||||
c.RiskControl.MaxPositions = 4
|
||||
c.RiskControl.BTCETHMaxLeverage = 20
|
||||
c.RiskControl.AltcoinMaxLeverage = 20
|
||||
// 5× equity notional per position: 4 positions = 20x total account
|
||||
// notional (full margin at 20x). Bigger single positions with room for
|
||||
// a balanced long/short book.
|
||||
c.RiskControl.BTCETHMaxPositionValueRatio = 5.0
|
||||
c.RiskControl.AltcoinMaxPositionValueRatio = 5.0
|
||||
c.RiskControl.MaxMarginUsage = 1.0
|
||||
c.RiskControl.MinConfidence = 78
|
||||
c.RiskControl.MinRiskRewardRatio = 3.0
|
||||
|
||||
Reference in New Issue
Block a user