Appearance

Personalize your experience

Mode
Accent Color
Direction
Step 6 — Exit & Risk

Step 6 — Exit & Risk

Wizard step

Exit conditions, stop loss, take profit, staged partial exits and portfolio-level limits. The step that decides whether a losing trade costs you a percent or an account.

The one non-negotiable

!
Caution:Never deploy a without an exit. An entry-only strategy is not a strategy that sometimes loses — it is a strategy that cannot ever close, and will hold a losing position until something outside the platform intervenes. At minimum, configure a . Condition exits and take profit are strongly recommended on top of it.

Three mechanisms can close a position, and they operate independently: the exit , the , and the take profit. Whichever comes first wins. That independence is deliberate — it means a stop still works when your exit condition has a bug in it.

Three ways to configure exits

Just like entry conditions, exits can be configured through the -and-drop , the node graph, or the DSL code editor. All three modes present the same fields — exit conditions, , take profit, and partial exits — in different . Changes sync in real time across all three .

Exit configuration in all three builder modes
┌──────────────────────────────────────────────────────────────────────────────┐
│                   EXIT CONFIGURATION IN THREE MODES                          │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  DRAG-DROP FORM                  NODE GRAPH                    CODE DSL      │
│  ┌──────────────┐               ┌──────────────┐            exit {          │
│  │ Exit Cond    │               │  ◉ RSI(14)   │              condition:    │
│  │ RSI < 70     │               │      ↓       │                RSI(14)<70  │
│  └──────────────┘               │  ◈ < 70      │              stopLoss: {   │
│                                 │      ↓       │                type: "atr" │
│  ┌──────────────┐               │  ◆ EXIT      │                value: 2.5  │
│  │ Stop Loss    │               └──────────────┘              }             │
│  │ Type: ATR    │                                             takeProfit: { │
│  │ Value: 2.5   │               ┌──────────────┐                type: "rr"  │
│  └──────────────┘               │  ⚠ STOP      │                ratio: 3    │
│                                 │  ATR × 2.5   │              }             │
│  ┌──────────────┐               └──────────────┘              partials: [   │
│  │ Take Profit  │                                               {pct: 40,   │
│  │ Type: R:R    │               ┌──────────────┐                 tgt: 2%}  │
│  │ Ratio: 3     │               │  ✓ TARGET    │                {pct: 30,   │
│  └──────────────┘               │  R:R = 3     │                 tgt: 4%}  │
│                                 └──────────────┘              ]             │
│  ┌──────────────┐                                           }               │
│  │ Partials     │               All three feed:                             │
│  │ 40% @ +2%    │               ┌──────────────┐                            │
│  │ 30% @ +4%    │               │  ◆ OR GATE   │                            │
│  │ 30% @ +6%    │               │      ↓       │                            │
│  └──────────────┘               │  ⬛ CLOSE    │                            │
│                                 └──────────────┘                            │
└──────────────────────────────────────────────────────────────────────────────┘

Same exit logic — condition, stop, target, partials — expressed three ways.
Switch modes anytime: changes sync instantly, no data lost.
EXIT CONFIGURATION — SAME LOGIC, THREE INTERFACESDrag-DropExit ConditionStop Loss: 2%Take Profit: R=3Partial Exits40% @ +2%30% @ +4%30% @ +6%Node GraphExitStopTargetORCLOSEvisual flowshows priorityCode DSL# exit conditionRSI(14) < 70# risk managementstopLoss:type: "atr"value: 2.5takeProfit:type: "rr"ratio: 3full controlsame exit logic — choose the interface that fits your workflow
Same exit logic configured three ways — form, graph, code. Switch anytime.
ℹ
Note:The -drop builder is fastest for simple exits with a stop and target. The node graph shows how multiple exit mechanisms combine (condition OR stop OR target). The code editor gives you full control and is best for bulk edits across multiple strategies.

Exit conditions

Exit conditions use the same structure as entries — left, operator, , joined by AND and OR. When the tree resolves true, a closing order goes out. The side is set automatically to the opposite of the entry.

FieldTypeDescription
conditionsConditionGroupThe exit tree. Identical structure to entry conditions. SMA(50) crossesBelow SMA(200) is a typical trend-reversal exit.
orderOrderConfig and time-in-force for the exit. Side is derived: sell to close a long, buy to close a short.
★
Pro tip:Make the exit condition the mirror of the entry thesis, not an independent idea. If you entered because a trend started, exit when the trend ends. An exit that measures something unrelated to the entry gives you two theses to be wrong about in one trade.

Stop loss

The stop caps the loss on a single trade. It is the most field in the , and the three calculation modes differ in one respect that matters: whether the distance adapts to market conditions.

STOP LOSS — THREE CALCULATION METHODSPercentagefixed % below entryEntry: 100Stop: 98 (−2%)✓ simpleATR-basedadapts to volatilityEntry: 100ATR = 3.5 (volatile)Stop: 93 (2×ATR)✓ adaptiveTrailingfollows price upPeak: 115Entry: 100Stop: 113 (2% trail)locksprofit✓ protects gainspercentage for simplicity · ATR for adaptation · trailing for trend-following
Three stop calculation methods — percentage for simplicity, ATR for adaptation, trailing for trend-following.
FieldTypeDefaultDescription
stopLoss.enabledbooleanfalseOn or off. Should be on.
stopLoss.type*"percentage" | "fixed" | "atr"—How the distance from entry is derived.
stopLoss.value*number—: percent below entry, 2 meaning 2%. : absolute price units. : the multiplier, 2 meaning 2 × ATR(14).
stopLoss.trailingbooleanfalseThe stop follows favourable movement, locking in gains. It never moves backwards.
stopLoss.trailingAmountnumber—How far behind the peak favourable price the trailing stop sits.
stopLoss.trailingType"percentage" | "fixed""percentage"Whether the trailing distance is a percent of the peak or an absolute amount.
Percentage, ATR and trailing stops on the same trade
PERCENTAGE STOP                        ATR STOP
entry 100, stop 2%                     entry 100, stop 2 × ATR(14)
                                       ATR = 3.50 → stop distance 7.00
price ▲                                price ▲
  105 │                                  105 │
  100 │ ── ENTRY                          100 │ ── ENTRY
      │                                       │
   98 │ ── STOP     max loss 2.00          93 │ ── STOP     max loss 7.00
      │  same distance in every regime        │  widens when volatility does


TRAILING STOP  (2% trail)

price ▲
  115 │ ── peak
  113 │ ── stop now here          (2% below the peak)
  110 │ ── stop was here          (when price was 112)
  108 │ ── stop was here          (when price was 110)
  100 │ ── ENTRY
   98 │ ── initial stop           (2% below entry)

the stop ratchets up as price rises and never moves back down;
the exit triggers when price falls to wherever the stop has reached

Configuring stops in drag-and-drop mode

  • Navigate to the Exit & Risk step
  • Check "Enable "
  • Select stop type from dropdown: , Price, or -based
  • Enter the stop — 2 for 2%, or 2.5 for 2.5×
  • Optional: enable trailing stop checkbox
  • Set trailing amount — how far the stop trails behind the peak price
  • Preview: the chart shows where the stop would have triggered on historical
  • Run a backtest to see stop-loss in the

Configuring stops in node graph

In the node builder, the appears as a dedicated risk node that feeds into the exit OR gate alongside condition and target nodes. This makes the visually: whichever mechanism fires first closes the position.

  • Add a "" node from the risk management palette
  • Click the node to configure: type (//) and
  • Enable trailing if desired — a sub-node appears with trailing parameters
  • Connect the stop node output to the exit OR gate input
  • The OR gate now has three inputs: exit condition, , take profit
  • Run the graph to validate — the execution log shows which mechanism fired per trade

Configuring stops in code DSL

stop loss configuration — all three types
# Percentage stop — simplest
stopLoss: {
  enabled: true
  type: "percentage"
  value: 2.0              # 2% below entry
  trailing: false
}

# ATR-based stop — adapts to volatility
stopLoss: {
  enabled: true
  type: "atr"
  value: 2.5              # 2.5× ATR(14)
  trailing: false
}

# Trailing stop — follows price up, locks gains
stopLoss: {
  enabled: true
  type: "percentage"
  value: 2.0              # initial stop
  trailing: true
  trailingAmount: 2.0     # trails 2% below peak
  trailingType: "percentage"
}
★
Pro tip:An ATR-based stop sizes itself to the and the moment. In a volatile it widens, so normal noise does not stop you out; in a quiet one it tightens and cuts losses faster. 14 with a multiplier of 2–3 is the conventional starting .
!
Caution:A stop is an instruction, not a guarantee. It executes when price reaches the level — if price gaps past it overnight or on news, the fill is wherever the market reopens, which can be far worse than the level you set. stops on positional strategies are especially exposed to this, and no stop setting protects against it.

Take profit

Take profit closes the position at a favourable target. Same three- as the stop, with risk-reward as the third option instead of .

FieldTypeDefaultDescription
takeProfit.enabledbooleanfalseWhen price reaches the target, the full remaining position closes.
takeProfit.type*"percentage" | "fixed" | "riskReward"— above entry, an absolute distance, or a multiple of the .
takeProfit.value*number—: 4 meaning 4%. : absolute units. Risk-reward: 2 meaning the target sits twice the away.
ℹ
Note:Risk-reward ties the target to the stop, which is the useful way to think about it. With a 2% stop and a ratio of 3, the target is 6%. That ratio also sets the you need: at 3:1, anything above 25% wins is profitable before costs. Quoting a win rate without the ratio beside it is meaningless — 80% wins at 1:4 loses money.

Partial exits

Partial exits take profit in stages rather than all at one target: bank some of the position early, let the rest run. It is the standard answer to the tension between not giving profits back and not capping a good trade.

Execution flow of a three-level partial exit ladder
PARTIAL EXIT LADDER — EXECUTION FLOW
──────────────────────────────────────────────────────────────

Entry: 100 shares @ $100

Price rises to $102 → Level 1 triggers
  ├─ Sell 40 shares @ $102         40 × $2  = +$80 banked
  └─ Remaining: 60 shares

Price rises to $104 → Level 2 triggers
  ├─ Sell 30 shares @ $104         30 × $4  = +$120 banked
  └─ Remaining: 30 shares

Price rises to $106 → Level 3 triggers
  ├─ Sell 30 shares @ $106         30 × $6  = +$180 banked
  └─ Remaining: 0 shares
  └─ Total profit: +$380

──────────────────────────────────────────────────────────────

Alternative: reverses at $103 after Level 1

Price rises to $102 → Level 1 triggers
  ├─ Sell 40 shares @ $102         40 × $2  = +$80 banked
  └─ Remaining: 60 shares

Price reverses to $98 → Stop triggers
  ├─ Sell 60 shares @ $98          60 × −$2 = −$120 loss
  └─ Net P&L:  +$80 − $120 = −$40

Without partials: 100 shares × −$2 = −$200
With partials:    net −$40
  → partials cut the loss by 80%

──────────────────────────────────────────────────────────────

CONFIGURATION IN DRAG-DROP:

┌─────────────────────────────────────┐
│  Partial Exit Levels                │
├─────────────────────────────────────┤
│  Level 1:  40%  @ +2.0%   target    │
│  Level 2:  30%  @ +4.0%   target    │
│  Level 3:  30%  @ +6.0%   target    │
│  ────────────────────────────────   │
│  Total:    100%                     │
│                                     │
│  [+ Add Level]  [Import Template]   │
└─────────────────────────────────────┘

CONFIGURATION IN CODE DSL:

partialExits: [
  { percent: 40, targetType: "percent_move", targetValue: 2.0 },
  { percent: 30, targetType: "percent_move", targetValue: 4.0 },
  { percent: 30, targetType: "percent_move", targetValue: 6.0 }
]
FieldTypeDescription
partialExitsPartialExit[]The levels, each specifying how much of the position to close and at what target.
partialExit.percent*numberShare of the total position closed at this level. Levels should sum to 100% or less; any remainder rides to the final target, stop or condition exit.
partialExit.targetType*"percent_move" | "fixed_price" | "rr" | "indicator"How the is computed: percent from entry, an exact price, a multiple of the , or a indicator level.
partialExit.targetValue*numberThe . For percent_move, 2 means exit at 2% profit; for rr, 1.5 means 1.5× the .
100 SHARES, ENTRY 100, STOP 98106sell 30%30 shlevel 3104sell 30%30 shlevel 2102sell 40%40 shlevel 1100ENTRY — 100 shares98sell restall levels hit: +80 +120 +180 = +380reverses at 103 after level 1: +80 banked, −120 stopped = −40 net, against −200 with no partials
Forty percent at +2%, thirty at +4%, thirty at +6%, the remainder on the stop.
The same ladder, and what a reversal costs with and without it
entry 100, stop 98 (−2%), position 100 shares

┌──────────────────────────────────────────────────────────┐
│  level 3    sell 30%  @ +6%  (106)      30 shares        │
│  level 2    sell 30%  @ +4%  (104)      30 shares        │
│  level 1    sell 40%  @ +2%  (102)      40 shares        │
│  ══════════ ENTRY 100 ══════════════════════════════════ │
│  stop       sell all remaining @ 98                      │
└──────────────────────────────────────────────────────────┘

all three levels hit
  102 → 40 × 2 = +80      104 → 30 × 4 = +120      106 → 30 × 6 = +180
  total +380

reverses at 103 after level 1
  banked  40 × 2 = +80        stopped  60 × 2 = −120       net −40
  without partial exits the same path is a flat −200

Configuring partials in drag-and-drop mode

  • In the Exit step, check "Enable Partial Exits"
  • Click "+ Add Level" to create the first partial exit
  • Set the percent of position to exit — e.g., 40% for the first level
  • Select target type: Percent Move, Risk-Reward Ratio, Price, or Indicator Level
  • Enter the target — 2 for 2% profit, or 1.5 for 1.5× the
  • Add additional levels with "+ Add Level" — each gets its own and target
  • Verify total ≤ 100% — the builder warns if you exceed position size
  • Use "Preview Ladder" to see partial exits marked on the chart alongside entry/stop
  • levels up/down to reorder them if targets should fire in a different sequence
  • Use : click "Load Template" for common patterns (40-30-30, 50-30-20, etc.)

Configuring partials in node graph

Partial exits in the node builder appear as a series of target nodes that feed into a staged exit coordinator. Each target node represents one level, and the coordinator ensures they fire in sequence as price moves through the targets.

  • Add a "Partial Exit Coordinator" node — this manages the ladder
  • Add a "Target Level" node for each partial exit you want
  • Configure each target: (40%, 30%, 30%) and (2%, 4%, 6%)
  • Connect each target node to the coordinator input ports
  • Connect the coordinator output to the exit OR gate
  • The graph shows visually how many levels you have and their order
  • Run the graph: execution log shows which levels and at what price

Configuring partials in code DSL

partial exits — three levels
partialExits: [  {    percent: 40    targetType: "percent_move"    targetValue: 2.0          # exit 40% at +2% profit  },  {    percent: 30    targetType: "percent_move"    targetValue: 4.0          # exit 30% at +4% profit  },  {    percent: 30    targetType: "rr"    targetValue: 3.0          # exit 30% at 3× risk-reward  }]# Alternative: indicator-based targetspartialExits: [  {    percent: 50    targetType: "indicator"    targetValue: "BB_Upper(20,2)"  # exit half at Bollinger upper band  },  {    percent: 50    targetType: "indicator"    targetValue: "EMA(21)"         # exit rest at EMA(21) hit  }]
ℹ
Note:Read the second half of that figure. A reversal at 103 after the first level has a −200 outcome into −40. Partial exits do not improve the best case — they cut the cost of being half , which is the most common way a trade ends.
★
Pro tip:Start with a simple 50-50 split: half at 2%, half at 4%. This gives you a feel for how partials behave without overcomplicating the ladder. Once you see it working in backtests, refine the percentages and add a third level if the 's and average move justify it.

Portfolio risk limits

Per-trade stops bound one trade. These bound the day and the book, which is what stops a correlated run of losses from into something structural.

FieldTypeDescription
maxDailyLossnumberDaily loss ceiling as a of capital. On breach the stops opening for the rest of the day. 3 means after a 3% daily loss.
maxOpenPositionsnumberConcurrent positions allowed across strategies. A portfolio-level cap against over-.
!
Caution:Set maxDailyLoss even on a you trust. It is the only control that limits the damage from a condition misfiring in an unusual market — the case where every trade the strategy takes is wrong for the same reason, and per-trade stops all fire in the same .

Exit retry

Exit orders can fail: a broker rejection, thin liquidity, a dropped . Because a failed exit leaves a position with no protection, retry behaviour is configurable rather than .

FieldTypeDefaultDescription
retryMaxAttemptsnumber3Attempts before the alerts and pauses.
retryDelayBarsnumber1Bars to wait between attempts.
retryCondition"re-evaluate" | "force-exit"—Re-evaluate re-checks the exit conditions and may abandon the exit if they no longer hold. Force-exit closes regardless.
★
Pro tip:Use force-exit for stop-driven exits and re-evaluate for condition-driven ones. A stop that gets talked out of closing by a one-bar is not a stop; a signal exit that no longer applies is worth reconsidering.

Before moving on

  • Chosen a builder for exit configuration — form, nodes, or code
  • A configured — this is not optional
  • appropriate: roughly 1–5% for equities, 3–8% for crypto, -based preferred
  • A take profit or exit condition present, ideally both
  • Trailing stop considered for trend-following strategies
  • Risk-reward target of at least 2:1 if using that
  • Partial exit levels if staged profit-taking suits the
  • Partial exit percentages sum to ≤100% — validated in the form
  • maxDailyLoss set to bound a bad
  • An exit condition acting as a backstop independent of the stop
  • Exit behaviour checked in a backtest, reading the exit-reason column
  • Retry settings configured before any
  • If using DSL: exit logic exported for or version control

See also

Related articles

  • Step 5 — Entry Signals

    Automation / Strategy Builder / Wizard Steps

    Where the strategy is actually written. Conditions, operators, nesting, order configuration, multiple entry sets, and the re-entry engine behind Grid, DCA…

  • Step 0 — Particulars

    Automation / Strategy Builder / Wizard Steps

    Identity and metadata: the name, description, tags and visibility that make a strategy findable a year from now. Also where the immutable Strategy ID is minted.

  • Step 1 — Settings

    Automation / Strategy Builder / Wizard Steps

    Global behaviour that decides how entries and exits interact: whether the strategy builds a position in stages, which multi-entry model it follows, and how…

  • Step 2 — Tagging

    Automation / Strategy Builder / Wizard Steps

    Optional. Client order ID templates, signal-level metadata and order linking — the machinery that makes live orders reconcilable against broker statements.

  • Step 3 — Symbol

    Automation / Strategy Builder / Wizard Steps

    The trading context: broker, segment, instrument, timeframe and session mode. These choices decide what data exists, what order types are available, and…

  • Step 4 — Quantity & Capital

    Automation / Strategy Builder / Wizard Steps

    How much to trade. Four sizing modes, the capital they draw on, the leverage applied, and how capital is divided across entry sets.

  • Step 7 — Strategy Testing

    Automation / Strategy Builder / Wizard Steps

    The testing step offers three modes, each answering different questions about strategy behavior. Use all three in sequence: backtest to validate logic,…

  • Step 8 — Review & Deploy

    Automation / Strategy Builder / Wizard Steps

    Review is the final step before deployment. It presents the complete strategy configuration in one place, runs validation checks, highlights errors and…

  • Strategy DSL — Execution Model

    Coding / Strategy DSL

    What the engine does on every bar: protective exits, exit signals, entries, layers and re-entries, sizing and costs, and where every statistic in the result…

Browse all knowledge base articles →