Every trader eventually wonders whether a different exit would have made more money.
The cleanest way to find out is to take the trades you actually made, keep the real entries, stops and share counts, and replay each one with the new exit rule against historical prices. Because only the exit changes, any difference in the results comes from the exit alone.
The catch is that small samples lie, and hindsight creeps in easily.
A looser exit can win over a long run and still lose over most short stretches, so a handful of trades can point you the wrong way. And a rule that quietly peeks at the future, such as selling at the best close, can make almost any change look brilliant.
A normal backtest generates its own entries from rules. That means you're testing the entry logic and the exit logic together, on trades you never took, at fills you never got.
Re-running your own history is narrower, and far more honest. The entries are real, the fills are real, the position sizes are real, and the slippage already happened. Change only the exit, and the difference in results comes from the exit alone.
The trade-off is that you can only learn about trades you took. It can't tell you anything about setups you passed on, and that's a genuine limit. But "would I have done better holding to the 21-day EMA?" can be answered, and it's one of the most valuable questions in trading.
The traders this blog draws on mostly work this way. Qullamaggie tells people not to take his word for anything and to verify it on their own charts, and even his partial-and-trail exit is framed as a question to study yourself. A low-friction version is to type in tickers from your own journal and ask one specific question of them.
Mark Minervini's loss-adjustment exercise is the same idea applied to losses. You recompute your history as if every loss had been capped at −10%. In his example, a −12.05% result became +79.89%.
Entry price, date, direction, initial stop and share count stay exactly as they were. Nothing about the entry changes, ever.
The moment you start adjusting entries too, you're back to a conventional backtest, with all of its problems.
Vague rules can't be tested. "Hold longer" isn't a rule. But each of the common swing exits can be written as one, for example:
Decide the mechanics before you look at any results, too. Does the original stop stay in place? What happens if the stock gaps through a level? Does a close-based rule fill at the close?
For every trade, start at the entry date and step forward day by day, testing the rule against that day's actual high, low and close. The first day the rule triggers is your simulated exit, at that day's price.
Keep the same price conventions throughout: split-adjusted but not dividend-adjusted. That way the simulated exits are comparable to the raw prices you actually filled at.
This is where most informal testing goes wrong.
It's tempting to check the rule against the three trades you remember exiting too early, and of course it looks good on those. So run it across every trade in the sample, winners and losers alike, and compare:
| Metric | Why it has to be in the comparison |
|---|---|
| Total P&L | The headline, and the least informative on its own |
| Win rate | Most exit changes move this, usually downward |
| Average win / average loss | Where the change actually shows up |
| Expectancy | The honest verdict, combining the three above |
| Max drawdown | A rule you cannot sit through is not an improvement |
Sample size matters as much as the metrics. A good rule is to log 20 to 30 trades of a setup before judging it at all. And a looser exit, whose gains arrive in a few big trends, needs more than that before its total means much.
This is the commonest trap, and the most damaging. Every rule has to be decidable using only data available on the day it fires.
"Close below the 21-day EMA" passes. "Sell two days before the top" doesn't. If your rule is "sell at the high of the move", you're using information that didn't exist at the time.
The subtler version is choosing the rule after seeing each trade. If you pick, trade by trade, whichever exit happened to work best, you'll always beat any single rule, and the gap is pure hindsight. A fair test fixes one rule in advance and applies it to every trade.
Test four or five.
A rule that beats your actual exits by 2% is noise. One that wins by 40% across sixty trades is more likely to be a finding. And if a rule wins on total P&L but doubles your drawdown, you haven't found an improvement. You've found a different risk profile.
Almost every exit that captures more of the move also lowers your win rate, because trades that were up a little now round-trip to a loss. If you can't tolerate the streaks that come with a much lower win rate, a rule that's better on paper is worse in practice. (The break-even maths is here.)
Whether the new rule is an improvement depends on whether you would actually have held. And that's the one thing no backtest can tell you.
Once both columns are side by side, a few quick checks tell you whether the difference means anything.
Split the trades into blocks by date. Take blocks of ten trades in the order they closed and see how often the new rule won each block. A looser exit often loses most blocks and still wins overall, because its gains arrive in a few big trends. That's normal, but it tells you how long you'd have to trust the rule before it paid.
Take out your best few trades. Recalculate both columns without the top five or ten. If the new rule's lead disappears, it rests on a handful of outliers, and you'd have needed to be holding on exactly those trades.
Compare the drawdowns, not just the totals. A rule that makes a bit more but digs a much deeper hole along the way is a different risk profile, not an upgrade.
Run a look-ahead check on yourself. Work out what "sell at the highest close before your actual exit" would have made. Nobody can trade that rule, but it shows you the ceiling. If your new rule gets anywhere near it, something in your test is seeing the future.
And remember the result only covers the market you traded in. A rule that shines in one strong stretch may not in the next, so treat the answer as a lead to keep checking, not a settled fact.
Everything above took a spreadsheet and a price database. TradePiko does the bookkeeping from your broker history, so the comparison is always on your real fills:
Sources and credits. The partial-and-trail breakout exit (sell part after 3–5 days, trail the rest on the 10-day moving average) is described by Kristjan Kullamägi (Qullamaggie) in My 3 timeless setups that have made me tens of millions. Recomputing your own history under a different rule echoes Mark Minervini's loss-adjustment exercise, including his −12.05% to +79.89% example. Qullamaggie's advice to verify setups yourself is from his interviews. Some ideas are adapted from public trader interviews and notes. Educational content only.