Skip to content

Instantly share code, notes, and snippets.

@ruzli
Created February 5, 2026 06:56
Show Gist options
  • Select an option

  • Save ruzli/a135dadc0c4c5e2b7654280ae0ae095a to your computer and use it in GitHub Desktop.

Select an option

Save ruzli/a135dadc0c4c5e2b7654280ae0ae095a to your computer and use it in GitHub Desktop.
Guide for creating strategies

๐ŸŽฒ Limbo Settings Configuration Guide

Last updated: February 2026

This document explains every supported field, action, condition, and value format usable in your limbo-settings.json strategy profiles โ€” including multi-rule arrays, USD/% parsing, maxTarget enforcement, strategy switching, streak-based conditions, emulation mode, and hotkey controls.


๐Ÿ”ง Top-Level Structure

{
  "activeProfileIndex": 0,
  "profiles": [ /* array of profile objects */ ]
}
  • activeProfileIndex: Integer. Index of the profile to use by default.
  • profiles: Array of strategy profile objects (see below).

๐Ÿ“ Profile Object

Each profile has two top-level keys:

{
  "id": "UniqueStrategyId",
  "name": "My Strategy",
  "strategy": { /* strategy config */ }
}
  • id: Required unique string ID used for switchStrategyId.
  • name: Human-readable name (for UI only).
  • strategy: The actual betting logic configuration.

๐Ÿ’ก Tip: Use descriptive IDs like "Martingale_USD_v2" โ€” theyโ€™re referenced during automatic strategy switching.


โš™๏ธ Strategy Configuration (strategy)

โœ… Core Fields

Field Type Description
enabled boolean If false, uses static CLI input instead of dynamic strategy.
baseBet string Starting bet amount. Supports: "0.01", "1 USD", "2.5%"
maxBetSize string Max allowed bet. Same formats as baseBet.
maxBetAction string One of: "stop", "reset", "reset-addbase", "switch_strategy"
maxTarget number (optional) Hard ceiling for target multiplier. Enforced per-bet.
maxTargetAction string One of: "stop", "reset", "reset-addtarget-base"

โš ๏ธ Note: maxBetAction = "reset-addbase" increases base after each breach (e.g., 1ร— โ†’ 2ร— โ†’ 3ร— base).
switch_strategy requires switchStrategyId.


๐Ÿ’ก USD & % Support

  • "1 USD" โ†’ auto-converts to selected currency using live price fetched once per session.
  • "2.5%" โ†’ uses 2.5% of starting balance in that currency (not recalculated mid-session).
  • Works in: baseBet, maxBetSize, stopOnProfit, stopOnLoss, and rule value fields.

โœ… Example: "baseBet": "0.5 USD" โ†’ if USDC = $1, bet = 0.5; if SHIB = $0.00001, bet = 50000.


๐ŸŽฏ Target Modes

Field Type Options / Notes
targetMode string "static", "random_range", "array_random"
staticTarget string/number e.g., "3.5"
randomTargetRange object { "min": 2.0, "max": 10.0 }
targetArray array [200, 75, 50, 100]
  • Only one mode is active at a time based on targetMode.
  • If onWin/onLoss rules modify currentTarget, they override the mode unless targetMode !== "static" โ€” then a new random/array target is regenerated each bet after rule application.

๐Ÿ” Exception: When switch_strategy activates, target is reinitialized from the new profileโ€™s mode.


๐Ÿ“ˆ Stop Conditions

Field Type Examples
stopOnProfit string "5", "10%", "25 USD"
stopOnLoss string "3", "15%", "10 USD"
switchStrategyId array of strings ["Paroli_v2", "Martingale_USD"]
  • If stop condition is met and switchStrategyId is non-empty โ†’ randomly switch to one of the listed profile IDs.
  • If empty โ†’ session stops.
  • USD/% thresholds use session-start prices/balance.

๐Ÿ”„ Bet & Target Adjustment Rules

โœจ Multi-Rule Arrays (NEW)

Both onWin and onLoss now support arrays of rule objects:

"onWin": [
  {
    "action": "add_static_amount_to_current_bet",
    "condition": "after_each_2_wins",
    "value": "0.01 USD"
  },
  {
    "action": "return_to_base",
    "condition": "after_each_10_wins"
  }
]

โœ… All matching rules are applied in order after each win/loss.

โœ… Supported Bet Actions

Action Description value Format
"return_to_base" Reset bet to baseBet โ€”
"increase_percent" Multiply current bet by (1 + value/100) number (e.g., 10)
"add_static_amount_to_base_bet" baseBet += value "0.5", "1 USD"
"add_static_amount_to_current_bet" currentBet += value same
"sub_static_amount_from_base_bet" baseBet -= value same
"sub_static_amount_from_current_bet" currentBet -= value same

๐Ÿ”’ All results clamped to โ‰ฅ minimum USD-equivalent of $0.001 (enforced in manual & auto modes).

โœ… Supported Target Actions

Action Description value Format
"return_to_base_target" Reset target to original base โ€”
"increase_percent_target" Multiply target by (1 + value/100) number
"add_static_amount_to_current_target" currentTarget += value number
"sub_static_amount_from_current_target" currentTarget -= value number

๐ŸŽฏ Targets always โ‰ฅ 1.01. If maxTarget is exceeded, maxTargetAction triggers.


๐Ÿ“Š Condition Syntax

Used in condition field for rules.

Format Trigger
"after_N_wins" Once when total wins โ‰ฅ N
"after_N_lose" Once when total losses โ‰ฅ N
"after_each_N_wins" Every Nth win (2, 4, 6...)
"after_every_N_wins" Alias for after_each_N_wins
(omitted or null) Apply every time

๐Ÿ”ข Counts are cumulative across the entire session.
Streaks are tracked via StreakTracker class (supports complex win/loss sequences).


๐Ÿ”„ Strategy Switching

  • Triggered by:
    • maxBetAction: "switch_strategy"
    • stopOnProfit / stopOnLoss with switchStrategyId
  • Selects random profile ID from switchStrategyId array.
  • On switch:
    • baseBet and currentBet are re-parsed (USD/% resolved)
    • startBalance resets to current balance
    • Target is reinitialized per new profileโ€™s targetMode

โ— Profile must exist in profiles array. Missing ID โ†’ session aborts.


๐ŸŽฎ Hotkey Controls (Manual Mode Only)

In manual_limbo and manual_mines, these keys work during active session:

Key Action
SPACE Place bet / pick tile
D Halve bet (min $0.001 USD)
F Double bet
E Halve target (min 1.01x)
R Double target
S Skip round (place $0.001 @ 1.01x, grey log)
Q Quit manual mode
C (Mines only) Cash out

๐Ÿ’ก Bet adjustments respect USD-equivalent minimum automatically.


๐Ÿงช Emulation Mode

Enable via shuffle-token.json:

{
  "emulation_mode": true,
  "emulation_balance": 50
}
  • Uses deterministic SHA-256 HMAC roll emulation (client-side)
  • No real API calls
  • Balance updates simulated
  • Great for testing strategies risk-free

๐Ÿ“ Example Full Profile (Modern Syntax)

{
  "id": "Hybrid_Recovery_v3",
  "name": "Hybrid Recovery v3",
  "strategy": {
    "enabled": true,
    "baseBet": "0.01 USD",
    "maxBetSize": "0.5 USD",
    "maxBetAction": "switch_strategy",
    "maxTarget": 1500,
    "maxTargetAction": "reset",
    "stopOnProfit": "30 USD",
    "stopOnLoss": "15 USD",
    "switchStrategyId": ["Martingale_USD", "Paroli_v2"],

    "targetMode": "static",
    "staticTarget": "40",

    "onWin": [
      {
        "action": "add_static_amount_to_current_bet",
        "condition": "after_each_3_wins",
        "value": "0.005 USD"
      },
      {
        "action": "return_to_base",
        "condition": "after_each_20_wins"
      }
    ],
    "onLoss": [
      {
        "action": "add_static_amount_to_current_bet",
        "condition": "after_each_5_lose",
        "value": "0.002 USD"
      }
    ]
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment