Execution Config

Per-pair runtime parameters set when creating a backtest or bot (position, stop-loss / take-profit, max drawdown, scale-in rules, etc.). Good execution config often matters more for P&L and drawdown than the entry conditions themselves.

An execution config is the runtime parameters attached per pair to a backtest task or trading bot—covering position size, stop-loss / take-profit, max drawdown, scale-in logic, and capital management. It decides "once a signal fires, how to actually open, how to close, and with how much money".

It lives per pair because the same signal set typically needs different capital and risk parameters across coins, accounts, and modes (live / paper). Lifting execution config out onto each running instance lets one signal set be tuned independently across many pairs and bots—no need to clone the strategy.

Execution config usually has a bigger impact on P&L and drawdown than the entry conditions themselves: oversized positions amplify single-trade loss; ill-set stops and targets cause premature exits or runaway drawdown.

This page covers what's in an execution config, what each item means, and how to use it; for indicator parameters inside the strategy (MA period, RSI threshold, etc.) see Indicators.

Where to set execution config

Execution config is not in the strategy editor—it's set per pair from one of these two entry points:

  • Create / edit a backtest task: in each pair's config card, fill in position size, stop-loss / take-profit, max drawdown, and other execution parameters, plus task-level initial capital, fees, and slippage. See Backtest Config, Create Backtest.
  • Create / edit a trading bot: in each pair's config card, fill in the execution config (including initial capital). The bot also has a bot-level safety net—overall TP / SL and default leverage. See Live Trading.

What's in an execution config

Common items (the actual fields are whatever the system ships):

ItemDescription
Initial capital / marginCapital allocated to this pair
LeverageLeverage in futures mode
Position sizingPer-trade or total exposure ratio (e.g. 10%, 20%); avoid all-in on one trade; can be capped to limit overall risk
Stop-lossAuto-close when single-trade or position loss hits the configured ratio; executed as soon as the level is touched
Take-profitAuto-close when profit hits the configured ratio to lock in gains
Max drawdownCap on overall drawdown; once exceeded, the system may reduce, pause, alert, etc. (exact behavior is system-defined)
Scale-in logicWhether scaling in is allowed, the conditions, and size per add (optional); must respect the position cap to avoid over-leverage
Fee rate / slippage (backtest only)For realistic cost simulation

For each item's meaning, allowed ranges, and system behavior, see Risk Management. Always size these against your own capital, risk tolerance, and the instrument's volatility—avoid aggressive values or values out of line with backtest.

Position sizing

Position size sets per-trade or total exposure and directly drives both P&L and drawdown.

  • Per-trade size: share of capital used per entry (e.g. 10%); too large and one loss hits the account hard, too small and upside is capped.
  • Total position cap: total open exposure must stay under some ratio, so you don't end up holding too many positions at once.
  • Recommendation: per trade often 5%–20% with a total cap; tune from backtest and instrument volatility; start small.

Stop-loss and take-profit

Stop-loss and take-profit are auto-executed when price hits the configured ratio. They work together with the strategy's sell / short conditions to decide when to close (any sell condition met, or stop / target hit, closes the position).

  • Stop-loss: caps single-trade loss so one trade can't take down the account; too tight gets you whipsawed, too loose lets losses grow. A single-trade stop of 3%–8% is common (of that trade or of the account, per system definition).
  • Take-profit: locks in profit and limits give-back; pairs with stop-loss to form a P/L ratio (e.g. take-profit / stop-loss ≥ 2:1). Common 8%–20% or set by ratio.
  • Recommendation: align with strategy logic and backtest first; in live / paper, use the same or similar stops and targets as in backtest for clearer attribution. See Risk Management.

Max drawdown and scale-in

  • Max drawdown: a cap on the pair / bot's peak-to-trough drawdown; when exceeded, the system may reduce size, pause, or alert (system-defined). Used to bound overall risk and prevent runaway drawdown after a streak of losses.
  • Scale-in logic: if scaling in is enabled, define when to scale and the size per add, and ensure total position stays under the cap. Scaling amplifies both upside and downside—pair with stops and drawdown limits.

Relation to the strategy

A complete trading algorithm = strategy (signals; decides when to open / close) + execution config (risk; decides per-trade size and exit boundaries). The two have orthogonal responsibilities and live in different places:

DimensionStrategy (signals)Execution config (risk)
What it decidesWhen to open, when to close on signalHow much to size, when to stop / take-profit, drawdown cap, scale-in rules
Where it livesOn the strategy object in the Strategy LibraryOn each backtest task / trading bot's per-pair config
Typical fieldsBuy / long & sell / short conditions, AND / OR / NOT, indicator periods and thresholdsPosition %, stop-loss %, take-profit %, max drawdown, scale-in logic, initial capital, leverage
Cross-scenario reuseOne signal set can run on many pairs and botsEach running instance configured independently
Where to configureConditions, Indicators, Create StrategyRun Backtest, Create Trading Bot

At runtime the two collaborate: signals trigger entries and exits, execution config controls per-trade size and risk.

Indicator parameters ≠ execution-config parameters

A common confusion: strategies also have "parameters" (indicator periods, thresholds), but those are a different kind from execution config.

CategoryExamplesDecidesLives on
Indicator parametersMA fast / slow period, RSI overbought / oversold thresholds, Bollinger width multiplier"How signals are computed"The strategy itself, travels with the strategy object; see Indicators
Execution-config parametersPosition %, stop-loss %, take-profit %, max drawdown, scale-in logic, initial capital, leverage"Once a signal fires, how to open / close and with how much money"Each pair's config under a backtest task / trading bot

You can optimize both together in a backtest, but with different mindsets: indicator parameters are easy to overfit to history and should be cross-validated across multiple time windows; execution-config tuning is closer to "money management + risk parameter tuning" and should consider instrument volatility and the account's overall risk exposure. For methodology see Optimization.

Usage tips

  • Execution config first: when creating a backtest or bot, lock in sensible position and stop / target before tuning entry conditions—bad risk settings cancel out good entries.
  • Backtest and live should match: keep execution config (size, stops, targets) consistent between live / paper and backtest for cleaner comparison and attribution; reassess risk if you change them.
  • Start conservative: when unsure, start with smaller size and tighter stops, then relax or tune based on backtest and live results.
  • Review periodically: once the bot is live, check periodically that the execution config still matches your capital and risk preference, and document any changes.

Common questions

What's the difference between execution config and strategy signals? Strategy signals decide "when to buy and when to sell" (condition logic) and live on the strategy object. Execution config governs "how much position to use, what stop and target to set, drawdown and scale-in rules" and is configured per pair when creating a backtest or bot. Together they decide actual trading behavior.

Why isn't execution config inside the strategy? Because the same signal set usually needs different capital and risk parameters across pairs, accounts, and modes (live / paper)—e.g. BTC and a small-cap won't share the same position size and stop. Putting execution config on the running instance lets one strategy be reused across many pairs and bots, configured independently in each place.

What stop / take-profit values are appropriate? There's no universal answer; tune to instrument volatility, strategy logic, and backtest. A common starting point is per-trade stop 3%–8%, take-profit 8%–20%, or a P/L ratio ≥ 2:1. Validate the combo via backtest for return and drawdown before going live. See Risk Management.

How large should the position be? It depends on capital and risk tolerance; per-trade 5%–20% is common, with a total cap. Larger size means more volatility—pair with stops and max drawdown.

Should backtest and live execution config match? Yes. If backtest uses 10% size and live uses 30%, results aren't comparable and live risk can far exceed backtest expectations. After changing execution config, re-backtest or validate with small live size.

Next steps