Risk Management
Two-layer risk control (per-pair execution config + bot-level safety net): how to set it up, plus monitoring and alerts.
The system uses two-layer risk control:
- Per-pair risk control (execution config): configured per pair when creating a backtest or when creating / editing a bot—see Execution Config—covering take-profit / stop-loss, profit protection, position, holding duration, add-on, capital management, and consecutive-loss management;
- Bot-level safety-net risk control: set when creating / editing a bot—overall take-profit / stop-loss and default leverage—to provide an overall safety net.
Backtest, live, and paper runs all enforce these settings automatically. The two layers run in parallel: whichever trips first triggers the corresponding risk-control action. This page covers each layer's config entry points, scope, and usage tips. For concepts see Trading Basics.
Where risk control is configured
Risk control has two main configuration entry points:
| Layer | Entry point | Main content | Scope |
|---|---|---|---|
| Per-pair (execution config) | Set per pair when creating a backtest (see Create Backtest) or when creating / editing a bot (see Live Trading (workflow)); semantics are detailed in Execution Config | Take-profit / stop-loss, profit protection, position, holding duration, add-on, capital management, consecutive-loss management, etc. | Controls "how this pair trades" |
| Bot-level (safety net) | Create / edit a bot (see Live Trading (workflow)) | Bot overall take-profit, overall stop-loss, default leverage | Controls "the bot's overall risk ceiling" |
We recommend completing the per-pair execution config first, then setting the bot-level safety-net thresholds.
Per-pair risk control (execution config)
Per-pair risk control is the core; you can think of it as a "six-dimension protection matrix" (field names follow the system UI):
| Dimension | Core capability | Typical config |
|---|---|---|
| Take-profit / Stop-loss (TP/SL) | Bound the P&L of a single trade | Fixed take-profit ratio, fixed stop-loss ratio |
| Profit Protection | Protect floating profit in a trend | Max take-profit, max stop-loss, profit-trigger point, profit give-back ratio |
| Position and holding duration | Control exposure and position lifecycle | Position ratio, max holding duration, reset TP/SL on timeout, full close on timeout |
| Dynamic add-on (DCA) | Adjust the position dynamically when conditions are met | Add on floating profit, add on floating loss, add at stop line, add interval and max count |
| Capital Guard | Cap risk expansion at the account / strategy level | Capital TP/SL, profit-give-back protection, consecutive-loss management |
| Signal Guard | Stop a failing strategy from running via signal-level rules | Close on opposite signal, prioritize closing on signal trigger |
"Consecutive-loss management" sits in the Capital Guard dimension of the execution config and is one of the core per-pair risk controls.
Execution-engine view (how it lands at runtime)
Per-pair risk control can be viewed as four execution layers:
- Entry capital allocation layer: single entry vs. scaled entry—decides how initial capital is used.
- Dual-core risk layer: fixed TP/SL + profit protection—decides close logic.
- Dynamic position layer: holding-duration management + dynamic add-on—decides how risk evolves while holding.
- Capital protection layer: capital circuit breaker + profit protection + consecutive-loss stop—decides whether the strategy keeps running.
The four layers work together so the bot can extend profits in trending phases while keeping drawdowns under control elsewhere.
Bot-level safety-net risk control
When creating / editing a bot, you can set bot-level safety-net parameters (bot overall take-profit, overall stop-loss, default leverage). This doesn't replace per-pair risk control—it's the last line of protection at the bot level. The bot's total capital usage is the sum of the per-pair allocations and has no separate "total cap" configuration.
You can think of it this way:
- Per-pair level: controls how each trade and the holding process behave for that pair.
- Bot level: caps how much risk the entire bot can take on.
How the two layers work together
The two layers act as parallel constraints:
- Whichever layer's condition trips first runs its risk-control action (e.g. close / pause).
- The per-pair level leans toward "controlling trading behavior"; the bot level leans toward "guarding overall thresholds".
- When the same strategy runs on different bots / pairs, each instance's execution config can be tuned independently, while bot-level thresholds can be set per account or risk preference.
Configuration tips
- Execution config first: when creating a backtest or bot, set the per-pair take-profit / stop-loss, position, capital management, and consecutive-loss thresholds first, then optimize the buy / long & sell / short conditions.
- Bot thresholds as a safety net: use bot-level take-profit / stop-loss for overall protection—try not to set them too far from the per-pair thresholds.
- Keep backtest / paper / live aligned: keep both layers consistent during validation to make attribution and comparison easier.
- Adjust by layer: if the problem is per-trade behavior, adjust the per-pair level first; if portfolio-level drawdowns exceed expectations, tighten the bot-level thresholds.
Monitoring and review
- Live monitoring: use the dashboard and Trade Statistics to watch current drawdown, positions, per-trade P&L, consecutive-loss state, and odd fills.
- Alerts: if the system supports drawdown-limit, consecutive-loss, or failed-trade alerts, enable them in Notification Config and act in time.
Auto Takeover manages manual positions you opened on the exchange—it is a separate feature from strategy / bot risk control.
Usage tips
- Per-pair first, then bot-level: finish the execution config first, then add the bot's safety-net thresholds to avoid parameter conflicts.
- Always set consecutive-loss limits: set sensible consecutive-loss caps per pair to keep losses from spreading.
- Small-step tuning: change only a few key parameters at a time (e.g. stop-loss or consecutive-loss threshold); changing too much at once makes attribution hard.
- Pre-live cross-check: before going live, confirm both the execution config and the bot safety-net parameters match your current risk tolerance.
Common questions
Is all risk control inside the execution config? No. Per-pair execution config is the core; when creating a bot there's also bot-level safety-net risk control (overall take-profit / stop-loss and default leverage).
Which layer does consecutive-loss management belong to? The capital-management module of the per-pair execution config—it stops trading once the consecutive-loss count is reached.
What if the two layers conflict? Think of it as "first to trip, first to act"; in general, leave detailed control to the per-pair level and let the bot level only act as an outer safety net.
Do I need both layers in backtest? At minimum, fully configure the per-pair risk control; if you plan to use the bot safety net later, configure and validate both before paper / live.
Next steps
- Execution Config — Per-pair risk control (TP / SL, position, consecutive-loss, etc.)
- Live Trading (workflow) — Create a bot and set the safety-net risk control
- Trade Statistics — Review and monitor risk-control triggers
- Monitor — Iterate parameters based on performance
- Trading Basics, Backtest Basics — Concepts and validation