Risk and limits
Stop-loss, take-profit and trailing
How exits work: stop-loss, take-profit and trailing stops, how the keeper watches prices all day, how it avoids being fooled by a single wick, and what happens with gaps, weekends and closed markets.
An exit is a rule that closes (part of) a position when the price reaches a level. Agents set exits when they open a position or later. A separate always-on process, the keeper, watches the prices and fires the exits. It does not depend on the agent's decision schedule, so a stop is checked about every two seconds even if the agent only decides once an hour.
The three exit types#
| Exit | What it does | Example |
|---|---|---|
| Stop-loss | Closes the position if price moves against you by a set distance | Long NVDA at $100 with a 5% stop: closes at about $95 |
| Take-profit | Closes a share of the position when price reaches a profit target. Up to three levels, each with a fraction | Take 50% off at +6%, the other 50% at +12% |
| Trailing stop | A stop that follows the price in your favour and never moves back | A 4% trail on a long: the stop sits 4% under the highest price seen since it was set |
Exits are always reduce-only: they can only shrink a position, never open or flip one. When a stop fires, the remaining take-profits for that position are cancelled (one cancels the other), and exits left behind by a position that is already closed are cleaned up.
Who sets them, and who wins#
- The agent can set exits with an order or later with a
set_exitsaction, within your limits: the stop may be no wider than your widest stop, and a stop can be required (risk limits). - Exits you set are marked as owner exits. The agent may only tighten them (move a stop closer, a trail narrower), never loosen them. If you turn off "let the agent move its exits", it cannot change them at all.
- A trailing stop's distance counts against the widest stop too.
Seeing and editing exits (the owner)#
- Everywhere a position is shown (the agent's page, My agents, Funds, the trade page) its exits sit on one line under it: the stop and who set it, the open take-profits, the trailing stop (and whether it is armed yet), the ladder, the time stop and any order waiting for the market. Details opens the full list: take-profit shares and which are hit, the stop move that follows a take-profit, ladder steps done or pending, the time left on a time stop, and a pending breakout entry or limit order with its deadline.
- On the chart (the trade page) the same levels are horizontal lines: the stop in a neutral colour, take-profits in the position's colour, an armed trailing stop and the ladder steps dashed, and an order waiting to fire in violet (the agent's plan). The keeper's moves that place no order (a stop moved by a ladder step or after a take-profit, a trailing stop armed, exits attached to a filled limit order) are small diamonds on the chart with the reason, and the same receipts are in the agent's decision log marked as keeper rules.
- Edit exits (on the agent's page, on your own agent, paper and real money): set or move the stop (a price, or a distance from the price now), up to three take-profits (a price, or a distance from the entry, and the share of the position each closes), a trailing stop (with an optional profit level at which it arms), up to four ladder steps and a time stop. Mistakes are shown next to the field before anything is sent, using the same rules the engine applies: the stop on the right side of the market, no wider than your widest stop, shares that add up to at most 100%.
- Brackets. A limit order can carry its own stop and take-profit; they attach by themselves on the first fill (see below). The exit tools an agent may use are listed in the creation wizard and under Edit agent.
- Cancel order on a waiting breakout entry or limit order removes it. Nothing has been bought yet, so nothing is closed.
How the owner lock works#
- You press Apply exits. The page only records a request, it never trades or signs. The trading engine applies it within seconds, the same way a close from the page is run, and the dialog shows the progress and the result (or the reason it was refused).
- What you set replaces the agent's own level of the same kind (your stop replaces its stop, your take-profits replace its take-profits). Kinds you leave alone stay as they are.
- From then on your exits are yours: the agent may only tighten them. It can move your stop closer or narrow your trailing stop, but a request to loosen them is refused with "Owner stop at X wins". The line under the position shows Yours and the stop reads "(you)".
- The change is recorded as a receipt in the decision log ("Exits set by the owner."), not as a decision of the agent.
It works while the agent is paused, braked or when you have switched off "let the agent move its exits", and for a real-money agent it does not need a wallet approval or the exchange: changing a stop is a rule the keeper enforces, not an order. It is also allowed while the platform kill switch is on, because exits only reduce risk. A request that the engine cannot apply (for example because the position closed meanwhile or the market is closed) ends with a plain explanation and nothing changes; one that waits longer than two minutes is dropped. Removing a trailing stop or a time stop is not possible from the dialog yet; close the position or let the agent do it.
Rules between decisions#
An agent decides every few minutes or less often, but the keeper works every two seconds. So the agent can hand the keeper rules that it enforces in between. Every rule below goes through the same confirmation as a stop, runs for paper and real money alike, and writes a receipt you can read in the decision log.
| Rule | What it does | Example |
|---|---|---|
| Stop ladder | When the price has moved a set distance in profit, the stop moves to entry plus a set percentage. Up to four steps. A step only ever tightens the stop; if the stop is already there or tighter, the step is skipped | At +1.5% move the stop to break-even; at +3% lock +1.5% |
| Stop after a take-profit | After a take-profit fills, the stop moves to break-even, to entry plus a percentage, or to the previous take-profit level | Take half off at +2%, then stop at break-even |
| Take-profit by price | A take-profit can be an absolute price instead of a distance from the entry (exactly one per level) | Sell 30% at $171.50 |
| Trailing activation | A trailing stop that only arms after the price has moved a set distance in profit. Until then it protects nothing, so a stop-loss is still needed | Trail 3%, but only after +2% |
| ATR trailing | The trailing distance is a multiple of the 1h ATR (the briefing's atr) instead of a percentage. The ATR value is read when the agent sets the rule and stays fixed until the agent sets it again | Trail 2 x ATR |
| Time stop | Closes the position if it is still open after N minutes. Optionally only if it is not in profit at that moment (a position in profit is kept and the rule is dropped) | Close after 4 hours if still under water |
Rules never loosen an exit and never get around your limits: a step cannot put a stop wider than your widest stop; an exit you set is only touched while "let the agent move its exits" is on; a stop is still required if you require one (a ladder or an activated trail alone does not count as a stop). Closes from a time stop or a stop move do not need new risk room, so they work while the kill switch is on.
Orders that wait: limit orders and breakout entries#
- Exits on a limit order. Exits declared with a resting limit order attach by themselves when it fills. They are sized by the position, so a partial fill is protected for what filled and the same exits follow the rest of the fill. The receipt says "exits attached".
- Breakout entry (stop entry). The agent can say "buy if the price reaches X" (or "sell if it falls to X"). The keeper watches the price and, once the move is confirmed like a stop, places the order as a new-risk order: your position cap, leverage cap, pilot caps, the kill switch, market hours and the event window all apply at that moment. If the kill switch is on or the market is closed it waits (the reason is shown on the entry) and tries again; if a limit would be breached or the agent was paused it is dropped, with the reason on the receipt.
- Expiry. A resting limit order or a breakout entry can carry a deadline. When it passes, an unfilled limit order is cancelled (status expired) and a pending entry lapses. Exits already attached to what did fill stay.
Why exits are not a single price tick#
Thin books produce wicks: a price spikes for a moment and returns. A stop that fires on one print would sell the bottom of a wick. The keeper therefore needs confirmation before it fires.
The confirmation rule#
- Reads. The keeper reads each trigger's price about every 2 seconds, with a random jitter of up to half a second, so no one can time a wick to a fixed schedule.
- Consecutive reads. The price must be beyond the level on at least 3 consecutive reads spanning at least 4 seconds.
- Median of five. The median of the last 5 reads must also be beyond the level. One extreme print cannot satisfy it.
- Thin or unmeasured prices. When the price source reports a wide uncertainty (wider than 50 basis points) or none, the rule is stricter: 6 consecutive reads over at least 30 seconds.
- Fresh re-check. After the keeper claims a trigger, it checks the newest price once more. If the price has recovered, the trigger goes back to waiting and its reads start over.
Take-profits use the same rule, with reads at or beyond the target. Emulated limit orders are the exception: they fire on a touch, because the order sent is a limit order that can only fill at the limit or better.
Stop-ladder steps, activation levels and breakout entries use the same confirmation, so a wick cannot move a stop to break-even or fire an entry either.
How trailing stops move#
A trailing stop remembers the best price since it was set (the high for a long, the low for a short). That best price only moves with the median of the last five reads, so a single pumped print cannot drag the stop upward and then trigger on the pullback. With an activation level, the trail arms once that median-confirmed best price has reached it (the moment is recorded in the decision log).
What a fire looks like#
- The keeper places a reduce-only market order with a slippage bound of 100 basis points (1%).
- The order is recorded before it is sent and goes through the normal executor. The fill appears on the chart as an exit marker linked to the trigger.
- If an attempt fails (a venue error, a rejection), the trigger goes back to waiting and retries with exponential backoff, from 1 second up to 60 seconds. A stop-loss is never silently dropped. The attempt count and the last error are stored so you can see why an exit has not executed yet.
- A trigger stuck mid-fire for more than 2 minutes (for example because the keeper restarted) is recovered.
Gaps#
Prices can jump past your stop: an overnight gap, a reopening after a closed session, a fast candle. A stop is a trigger, not a guarantee of the price.
- If the confirmed price is through the stop by 100 basis points (1%) or more, the keeper fires a market order at the current price. It does not place a limit order at the stop level (which would never fill) and does not wait for the price to come back. The fill is worse than your level by the gap.
- For a gap-through, the slippage bound is wider, 500 basis points (5%), and is measured from the current price, not from the level. The decision log marks it as a gap-through.
- A crash guard flags a move of more than 20% against a position within 5 minutes so that it is paged and visible.
Weekends, after hours and stale prices#
- Stock perps trade around the clock on Phoenix, but liquidity is thinner outside US market hours, and from Friday evening to Sunday evening (US Eastern) the price comes from the exchange's own book rather than from the external stock price. The engine limits new risk then (markets).
- Closed or paused markets. The keeper skips the market, resets its reads, and looks again every 15 seconds. Corporate-action pauses (tokenized stocks) work the same way and rescale levels when the price basis changes.
- Stale prices. A price older than 10 seconds, or flagged stale by its source, is never used to fire an exit. This is also treated as a health problem of the price feed.
Exits on real money#
For real-money agents, exits are enforced by the keeper and not by native stop orders on the exchange. This is deliberate: it lets the confirmation rules above apply, and it lets the signing policy refuse any conditional-order flags. The consequence is that exits depend on the keeper and the price feed being up. If you must be sure of flat exposure, close the position yourself or stop the agent (which closes its positions first).
Exits are never blocked by the platform kill switch, the pilot caps or the AI allowance. A downgrade or an exhausted allowance makes an agent slower, never unable to get out.
Practical tips#
- Put stops where the trade idea is wrong, not at an arbitrary percentage.
- On leveraged positions, keep the stop well inside the distance at which you would be liquidated (glossary: liquidation).
- Use more than one take-profit level to bank gains while keeping a trailing runner.
- Read the exit markers: the reason on a fired trigger tells you whether it was a normal fire or a gap-through.