Exit plansRisk managementAutomationBeginners

How to build your first automated exit plan and take-profit strategy

An automated exit plan needs hard price targets, time limits, and a kill switch before the agent starts trading. This checklist shows first-time builders how to design exits that fire safely.

By the Felix team12 min read
Key takeaways
  • 01An exit plan must include a profit target, a loss limit, and a time limit before the agent ever opens a position.
  • 02The stop-loss order should be placed at the same moment as the entry, not left as a decision for later.
  • 03Hard limits enforced by scoped keys and infrastructure prevent an agent from overriding your exit rules.
  • 04Paper trading must show at least one full exit cycle, including a stop-loss fill, before you authorize a live key.
  • 05The first day of live automation is a test of your safety system, not a test of your strategy's profitability.

An automated exit plan is a set of price targets, time limits, and kill switches that fire without your intervention once an agent opens a position. If you have never automated a trade before, the plan is the most important piece of infrastructure because it is the only guarantee that a losing position will close while you are away from the screen. The checklist below covers how to build these rules into a non-custodial agent so that the machine decides when to exit, not your emotions.

What is an exit plan when an agent is trading?

An exit plan is the set of conditions that close a position after the agent opens it. In manual trading, you might watch a chart, read news, and decide to sell when the story changes. An agent does not watch charts the way a human does, and it does not feel fear or hope. It follows instructions. The exit plan turns those instructions into executable orders that sit on a venue or broker and wait for their trigger. Without it, the agent has no concept of enough or too much, and a single position can sit open through every price swing until it drains the entire daily budget.

The plan should contain three concrete things: a profit target, a loss limit, and a time limit. The profit target is the price or percentage at which the agent takes gains and moves on. The loss limit is the price or percentage at which the agent cuts the loss before it grows. The time limit is the maximum duration the position may remain open, regardless of whether the price looks favorable. These three rules together form a box around the trade. Nothing inside the box requires human judgment. Nothing outside the box is allowed to happen, even if the agent's reasoning model believes the market is about to reverse.

The exit plan is not the same as the entry strategy. The entry strategy decides when to buy or sell short. The exit plan decides when the position ends. Many beginners spend weeks tuning entry signals and fifteen minutes on exits. That inversion is dangerous. A mediocre entry with a strict exit plan can survive. A brilliant entry with no exit plan will eventually give back all gains and more. The agent does not care how clever your entry model is. It only cares whether the next instruction is to close or hold.

You should write the exit plan before you write the entry logic. It is easier to justify a trade when you know exactly how much you are willing to lose and how long you are willing to wait. If you cannot define those numbers with confidence, you are not ready to automate. The agent will not hesitate, second-guess, or hope for recovery. It will execute exactly what you gave it, down to the last dollar. Make sure what you gave it is survivable, because trading can lose money, including the full amount allocated to the position.

How do you set take-profit levels before the agent opens a position?

Take-profit levels must be numbers, not ideas. You cannot tell an agent to exit when it looks good or take profits near resistance. Those phrases mean something to a human who can read a chart, but to an agent they are uncomputable. You must give it a price, a percentage, or a dollar amount, and you must do this before the first order is placed. The simplest method is a fixed percentage above the entry price. If you instruct the agent to buy an asset at one hundred dollars and set a five percent take-profit, the agent places an order to sell at one hundred five dollars immediately after entry. This is called a bracket exit, and it is the safest starting point for someone who has never automated a trade.

Because Felix normalizes order sizing in plain US dollars, you can think in dollar terms rather than venue-specific contract math. Suppose you allocate two hundred dollars to a single position. You can instruct the agent to close half the position at a three percent gain and let the rest run with a trailing stop. The exact request schema is in the docs, but the shape looks like this: you send the entry size in dollars, the take-profit threshold, and the stop distance, and the API translates those into the correct contracts or shares for the venue. You do not need to calculate lot sizes or tick values. That abstraction is useful because it keeps your mind on risk in dollars, not on symbolic units.

Time-based exits deserve equal attention. Suppose you give the agent a maximum holding period of twenty-four hours. If the price has not hit the profit target or the stop after one day, the agent closes at market. This prevents capital from being trapped in a stagnant position while other opportunities appear. It also prevents the psychological trap of just one more day that manual traders fall into. Set the time limit in hours, not in vague terms, and make sure the agent's clock is synchronized with the venue's clock.

Be careful with asymmetry. A take-profit that is ten percent away while your stop-loss is two percent away means you need to win more than five out of six trades just to break even after fees and slippage. That is not necessarily wrong, but it must be deliberate. Write the ratio down before you automate. If the numbers feel random, the agent will produce random results. A common beginner mistake is to set a distant profit target because they are afraid of missing a big move, while setting a tight stop because they are afraid of losing money. That asymmetry creates a strategy that bleeds slowly and rarely wins big. Trading can lose money, including the entire position, so the distance between your entry and your stop should reflect a loss you can actually afford to take repeatedly.

Where does the stop-loss fit in an automated exit plan?

The stop-loss is not a separate feature that you add after the trade goes wrong. It is part of the same bracket that contains the take-profit. When the agent enters a position, it should place the stop-loss order simultaneously, or even as a single bundled instruction with the entry. If you rely on the agent to decide later whether to cut losses, you have created a dangerous gap where delay, confusion, or a model hallucination can destroy capital. The stop-loss must be a hard limit, not a suggestion in the prompt.

Hard limits are enforced by the infrastructure, not just by the language model. You can tell an agent in natural language to stop out at two percent down, but the real protection comes from a scoped key or API parameter that refuses to accept an order without the stop attached, or that rejects a price worse than the limit. This is the difference between a polite request and a physical barrier. The polite request can be ignored by a confused model or a creative interpretation. The barrier cannot. You need both layers. The prompt defines the intent, and the infrastructure enforces the boundary. If the two disagree, the infrastructure wins, which is exactly what you want.

Set the stop-loss at a distance that makes sense for the market you are trading. Stocks, crypto, perpetual futures, options, and prediction markets all move at different speeds and have different typical ranges. A two percent stop might work for a large-cap stock and be guaranteed to trigger on normal noise for a volatile crypto asset. There is no universal number. Test the distance in paper trading first. Watch how often the stop would have triggered on historical price action. Never move the stop-loss farther away after the trade is open just because the price is approaching it. That is called moving the goalposts, and it defeats the purpose of automation. If you override the plan manually, you did not automate an exit. You delayed a decision and added emotional damage to financial damage.

How do you keep an agent from overriding your exit rules?

An agent can only override your rules if the system allows it. Felix is non-custodial by construction, which means the agent can spend within the limits you set but cannot withdraw funds to itself or change owner-approved addresses. You should extend this principle to exits. The exit plan should be baked into the permissions that the agent carries, not just the text of its prompt or the conversation history in an MCP client.

Start with scoped keys. A scoped key can be restricted to specific markets, specific order types, and specific dollar amounts. If the key cannot place an order without a stop-loss attached, then the agent cannot accidentally open an unprotected position. Add budget caps so the agent cannot risk more than a fixed dollar amount per day or per position. Add position limits so it cannot pyramid into a losing trade by adding more size as the price drops. These are the same architectural ideas covered in how trading with an agent changes security from first principles, applied specifically to the moment of exit.

The panic switch is the final layer. A kill switch flattens every position and revokes the agent's access immediately. You should test this before the agent ever trades live. Press it during paper trading. Watch the positions close and the key expire. If the test fails, fix the configuration. Do not assume it works because you read the documentation. The practical checklist for running a non-custodial agent through MCP includes a step-by-step verification of this exact flow, and you should follow it before authorizing any live key.

What should you verify before the first live trading session?

Paper trading exists for exactly this purpose. Run the agent in simulation for long enough to see multiple exits trigger under different conditions. You want to see a take-profit fill cleanly. You want to see a stop-loss fill cleanly. You want to see a time-based exit close a position that has gone nowhere. You also want to see what happens when the agent tries to violate a limit. The rejection should be immediate and final. If the agent retries a rejected order endlessly, or if it opens a position without the attached stop, you have a bug, not a strategy. Fix the bug first.

  • ·At least one take-profit fill in paper trading.
  • ·At least one stop-loss fill in paper trading.
  • ·At least one time-based exit before the limit is reached.
  • ·A clean rejection when the agent tries to exceed a hard limit.
  • ·Audit logs that show every attempted order and the exact reason for any rejection.

During this phase, set up audit logs and observability with hard limits. You need a record of every decision the agent made, every quote it saw, and every order it attempted. When a live trade goes wrong, the log is the only way to know whether the agent misread the plan, the market gapped through the stop, or the infrastructure failed to enforce the limit. Logs are not optional for automated trading. They are the evidence you use to fix the system and the proof you use to understand whether your plan is behaving as intended.

Before you authorize a live key, walk through the process to evaluate taking an AI trading agent live using MCP. The evaluation includes checking that your exit plan is expressed in the prompt, in the API parameters, and in the key permissions. If any of those three layers is missing, the plan is fragile. Live trading requires explicit owner authorization of the key, so use that moment as a final review. Do not authorize while distracted or in a hurry. The key you authorize is the key that can lose real money, and once the agent is live, the exits will fire whether you are watching or not.

How do you manage the first day of automated live trading?

Start with the smallest position size the venue allows. You are not testing whether the strategy makes money on day one. You are testing whether the automation behaves correctly under real market conditions. Watch the first entry and the first exit. Check that the stop-loss was attached. Check that the take-profit was placed at the right level. Do not add more capital until you have seen the full lifecycle of at least one trade. If the agent opens a position and the stop-loss is not attached, kill the session immediately and fix the configuration before continuing.

Do not micromanage. If you sit at the screen and cancel the agent's exits because you think the market will turn in the next five minutes, you are manual trading with extra steps. The point of automation is to remove your emotions from the exit. If you do not trust the plan, stop the agent and rewrite the plan during a calm moment when no position is open. Do not rewrite the plan while a position is open. That is the exact emotional state that causes manual traders to hold losers too long.

Keep the kill switch visible and within reach. Know exactly how to trigger it. After the session ends, review the logs. Compare the intended exits with the actual fills. Slippage happens. Gaps happen. The stop-loss price you set is not always the price you get. That is normal, but you need to know how normal it is for your market. Adjust your position sizing so that a gap through the stop does not damage your total budget. Remember that trading can lose money, and the first day of live automation is a test of your safety system, not a test of your market genius. If the safety system works, you can scale. If it does not, you have lost a small amount of money to learn something important.

Frequently asked questions

Can I change my exit plan while the agent is holding a position?

You can, but you should not. Changing the plan during an open trade usually means you are reacting to emotion, which is the exact behavior automation is meant to remove. If the plan is truly broken, flatten the position manually, stop the agent, and redesign the rules before restarting.

Does the agent need to watch the market continuously to hit a take-profit?

No. The take-profit order is placed with the venue or broker when the position opens, so it fills automatically when the price touches the target. The agent does not need to be online or awake at the moment of execution.

What happens if the market gaps past my stop-loss?

You will be filled at the next available price, which may be worse than your stop price. This is called slippage, and it is a normal risk in all markets. You cannot eliminate it, but you can limit the damage by keeping position sizes small enough that a single gap does not ruin your budget.

How do I know if my agent is actually using the stop-loss I set?

Check the audit logs and the order history after each paper trade. The log should show the stop-loss order attached to the entry at the exact moment the position opened. If the stop appears seconds later, or never appears, your configuration is wrong and the agent is not protected.

Should I automate exits for options and prediction markets the same way as stocks?

The same principles apply, but the mechanics differ. Options may have liquidity constraints that make stop-losses difficult to fill, and prediction markets can resolve abruptly. You must adjust your time limits and position sizes for each market type, but the rule of placing the exit at entry remains the same.

Can I use a trailing stop instead of a fixed take-profit?

Yes, but you must define the trailing distance in exact dollars or percentages before the trade begins. A trailing stop that is not precisely parameterized will behave unpredictably when the agent encounters volatile price action. Test it thoroughly in paper trading before using it with real money.

Give your agent a key.

One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.

Keep reading

Not a brokerage, exchange, or investment adviser. Not investment advice. Trading involves risk, including total loss.