Skip to main content

Documentation Index

Fetch the complete documentation index at: https://uncoded.ch/docs/llms.txt

Use this file to discover all available pages before exploring further.

Risk management is the layer that decides how much you lose when you lose. Strategy decides direction; risk management decides survival. Most operators who blow up don’t have bad strategies — they have inadequate risk management. Get this right and a bad month is recoverable; get it wrong and a bad week can be terminal.

The five pillars of unCoded risk management

The kill switch

Your most important control. Pauses new orders immediately. Existing positions continue to manage. Use early, use often.

Stop-loss and trailing stops

Per-mode stop-losses bound the worst-case per-trade outcome. Trailing stops protect profit on trending positions.

Capital allocation

How much capital you commit per pair, per mode, per venue. The sizing decisions that determine exposure.

Reserves

The 50% rule. Trading capital + reserve = total exchange balance. Reserve is what you don’t deploy.

Sub-accounts

Strategy isolation. Run experimental modes in sub-accounts so a misbehaving strategy can’t affect your validated setup.

The kill switch (again)

Worth listing twice. It’s the control that’s there for the worst day. Operators who use it well sleep well.

The honest framing

unCoded does not guarantee returns. It is a disciplined execution engine that enforces the rules you authored or selected. The market decides outcomes. Risk management is the layer that limits how much the market can hurt you on any given day.What unCoded does NOT do for you:
  • ❌ Predict the future direction of the market.
  • ❌ Detect black-swan events before they happen.
  • ❌ Override your decisions when they’re bad.
  • ❌ Recover capital you’ve already lost.
  • ❌ Compensate for inadequate operator discipline.
What unCoded DOES do for you:
  • ✅ Enforce per-mode stop-losses on every position.
  • ✅ Honor trailing-stop logic when configured.
  • ✅ Halt new buying when you flip the kill switch.
  • ✅ Continue managing existing positions during your absence.
  • ✅ Provide the data (Dashboard, logs, backtest results) you need to make informed risk decisions.
Risk management is the operator’s job. The bot enforces; you decide.

The risk-management hierarchy

Operators who survive long-term apply risk management in this priority order:
1

Permission scoping (no withdrawal)

Most-important. Even a fully compromised key cannot drain your account if withdrawal is disabled. See API Key Security.
2

Reserve sizing (50% rule)

Don’t deploy 100% of your exchange balance. Reserve buffer absorbs drawdowns and provides flexibility.
3

Per-pair capital limits

No single pair gets more than 25% of your trading capital. Concentration risk is a real source of operator pain.
4

Per-mode stop-loss configuration

Verify stop-losses are set on every active mode. The default values are typically conservative; tighter is acceptable, looser requires deliberate intent.
5

Kill-switch readiness

Bookmark the Dashboard’s kill-switch button location. Speed matters when something is wrong.
6

Sub-account isolation for experiments

Never test new modes/strategies on the same account as your validated production setup.
7

Daily kill-switch readiness check

A daily 30-second check that the bot is doing what you expect builds the intuition you need to spot anomalies fast.

Common operator risk patterns

Pattern: deploys 100% of exchange balance to active modes, no reserve. “I want to maximize the working capital.”Failure mode: any drawdown is felt at full leverage. A -20% drawdown removes 20% of your operational base. No buffer to take advantage of opportunities, no buffer to absorb stress.Better: 50% in active modes, 50% reserve. Lower nominal returns when good but dramatically better resilience when bad.
Pattern: 20+ active pairs, multiple modes, multiple venues. “Diversification reduces risk.”Failure mode: cognitive overload. You can’t track 20+ positions across multiple modes. Anomalies go unnoticed. Per-pair capital is so small that fees dominate.Better: 3–8 active pairs maximum, 1–2 modes, 1–2 venues. Manageable scope.
Pattern: refuses to use the kill switch because “I don’t want to miss the recovery.”Failure mode: keeps buying into worsening situations. The kill switch’s purpose is to pause new buying — existing positions still ride the recovery if there is one.Better: flip the kill switch at the first sign of unfamiliar market behavior. You can always flip it back. Cost of a false alarm: zero. Cost of not flipping when you should: large.
Pattern: switches modes weekly based on recent performance. “BasicMode is underperforming; let me try FullBullMarket.”Failure mode: every mode change loses the in-flight positions’ optimization. By the time you’ve validated the new mode, the regime has shifted again.Better: pick a mode after backtesting, run it for 2+ months, evaluate dispassionately, only change after evidence (not gut feeling).
Pattern: thinks of trading capital as “borrowed funds I want to multiply.”Failure mode: emotional attachment to specific outcome size. Decisions distorted by the need to “win back” losses or “compound” wins.Better: think of trading capital as “capital allocated to the trading machine.” Win, lose, or break-even, the relationship is dispassionate. Risk management is easier when ego is not involved.

Worst-case scenarios — what to plan for

The buy ladder fully invests, position is heavily underwater, sell ladder is far above current price, the position is “stuck.”What unCoded does: continues holding the position. Stop-loss triggers if reached. Sell ladder waits for price recovery.What you should do:
  • Don’t panic-close at the bottom (ironic but common).
  • Decide: is the symbol fundamentally OK? If yes, hold. If you’ve lost confidence, exit manually and accept the loss.
  • Use kill switch to prevent new buying on that pair.
  • Capital reserve helps you avoid being forced to sell at the bottom.
Connection drops, no orders can be placed or modified.What unCoded does: existing exchange-side orders continue. Bot retries connection until venue returns. Reconciles on reconnect.What you should do:
  • Funds are safe — they’re on the exchange, not your VPS.
  • Sit tight. There’s nothing operator action can fix during venue outage.
  • Watch news for updates on the venue’s status.
  • When venue returns, verify reconciliation matches expectation.
Your VPS becomes unreachable. Database may be lost (depending on backup state).What unCoded does: exchange-side orders continue honoring. Trading effectively pauses until the bot is brought back online.What you should do:
  • Restore from your most recent database backup (you do back up daily, right?).
  • Spin up a replacement VPS, deploy unCoded, restore database, restart.
  • The exchange is the source of truth for your funds. Your capital is intact.
  • Lost: only the local trade history since last backup.
Unauthorized API activity from your key.What unCoded does: nothing — this is exchange-level.What you should do:
  • Immediately revoke the key at the venue.
  • Generate new key with correct permissions.
  • Update Dashboard, restart bot.
  • Review the venue’s audit log for the leak window — what did the attacker do?
  • Because you correctly disabled withdrawal, the worst case is the attacker traded your funds. They can’t drain.
You’re stressed. Positions are underwater. You want to do something.What unCoded does: keeps following the rules.What you should do:
  1. Step back. Coffee. Walk.
  2. Open the Dashboard. Look at actual positions, actual P&L, actual unrealized exposure.
  3. Decide: is this within historical drawdown ranges? If yes, hold.
  4. If you really want to act: kill switch ON. Don’t close positions out of fear.
  5. Wait for clarity (an hour? a day?). Then decide with calmer head.
Most “panic decisions” worsen outcomes. The bot’s discipline is your friend during your worst hours.

Best practices — the universal risk principles

  • Never enable withdrawal on API keys. Single most important rule.
  • Keep ~50% of total exchange balance as reserve (not deployed to active modes).
  • No single pair > 25% of your trading capital.
  • Backtest before deploying capital. Validate on multiple historical regimes.
  • Forward-test on small capital before scaling. Backtest is necessary, not sufficient.
  • Verify per-mode stop-losses are set on every active mode.
  • Daily 5-minute Dashboard check to build intuition for normal behavior.
  • Bookmark the kill-switch button for fast access during stress.
  • Rotate API keys quarterly. Even without incidents.
  • Sub-account isolation for experiments. Don’t risk validated production on new strategies.
  • Documented operator runbook — daily/weekly/monthly routines.
  • Don’t double-down during drawdowns. Reserve is for emergencies, not for averaging losses.
  • Maintain VPS daily database backups off-site. Recovery time matters.
  • Calm-head decision-making during volatility. No panic actions.
  • Treat the bot as the discipline you don’t have at 3 AM — let it work.

What’s next

Kill switch

Your most important control — when to flip, how it behaves.

Stop-loss and trailing

Per-mode stop-loss configuration and trailing-stop dynamics.

Capital allocation

Sizing decisions — per pair, per mode, per venue.

Reserves

The 50% rule and how to think about reserve capital.

Sub-accounts

Strategy isolation for experimentation.

Backtesting

Validate before risking capital.
Last modified on May 3, 2026