Trading exit optimization becomes considerably more interesting when you stop looking at individual exits and start looking at how they work together. A stop loss, a profit target and a time exit can each change the behavior of your breakout strategy. But how do you decide which combination actually makes sense?

In the previous lesson, I shared one of my favorite exit techniques: bars since entry (BSE). In our hedge fund, we tested hundreds of much more sophisticated exit techniques. And yet, this remarkably simple exit beat hundreds of them in our tests. In my experience, it is applicable across different markets, timeframes and trading platforms. The important part is knowing how to optimize it properly.

Today, I want to take that process one step further. Using a foundational E-mini Nasdaq breakout strategy in BreakoutOS, I will show you how I approach the optimization of three exit settings simultaneously, why I do not simply accept the optimizer’s recommendation, and what I look for in the results before choosing a candidate.

Watch the full video below, then read on for the complete breakdown.

Why Trading Exit Optimization Becomes More Complex

Let’s start with a very simple breakout model on 60-minute E-mini Nasdaq futures data. There are no additional filters or special improvements in this foundational model. Its existing exit is set to 20 bars since entry, meaning the strategy exits after spending 20 bars in the position.

When we optimize BSE alone, we can compare a series of holding periods using a simple bar chart. We can inspect the performance of each value and see whether the neighboring values produce similarly strong results. If you want to understand why I put so much emphasis on neighboring values, I cover this in more detail in my masterclass on how to validate a trading strategy.

Once we introduce two additional exit settings, however, the optimization changes substantially.

  • Bars since entry: determines how long the strategy can remain in a position.
  • Stop loss: introduces a protective exit based on an adverse price move.
  • Profit target: introduces an exit when the specified profit threshold is reached.

Instead of evaluating a single series of values, we now need to evaluate combinations. A stop loss that looks attractive with one profit target may behave differently with another target or another holding period. This is why I want to look at the three settings together rather than assume that individually attractive values will produce an attractive combination.

Choosing Stop Loss and Profit Target Optimization Ranges

Before running the optimizer, you need to understand your market. E-mini Nasdaq is a volatile instrument, and the ranges I would investigate for this example reflect that volatility. A stop of approximately $3,000 on the full-size contract corresponds to roughly $300 on the micro contract for the same price movement.

These are not universal stop loss recommendations. Your market, timeframe and previous backtests should inform the ranges you choose. Knowing what constitutes a reasonable range is part of the craftsmanship of systematic strategy development.

For this demonstration, I use the following optimization settings:

Exit parameter Test range Increment Values tested
Stop loss $3,000–$10,000 $1,000 8
Profit target $3,000–$15,000 $1,000 13
Bars since entry 5–20 bars 5 bars 4

Multiplying eight stop loss values by thirteen profit target values and four BSE settings gives us 416 combinations to investigate in a single optimization run.

I deliberately use relatively coarse $1,000 increments to keep the demonstration simple. In my normal research, I might investigate $500 increments or explore additional holding periods. The purpose here is to understand the process, not to establish a definitive range for every Nasdaq strategy.

Why I Don’t Automatically Accept the Optimizer’s Recommendation

After running the Auto Optimizer in BreakoutOS, the initial recommendation is an $8,000 stop loss, a $5,000 profit target and an exit after 20 bars.

Personally, I generally prefer not to have a profit target smaller than my stop loss. That is my preference, and other traders may approach this relationship differently. Rather than rejecting the result immediately, I apply the recommended settings so we can compare the adjusted strategy with the original model.

Here is what the displayed historical backtest comparison shows:

Metric Original model With recommended exits
Total P/L $458,945 $284,050
Maximum drawdown $57,545 $51,765
Net profit / drawdown 7.98 5.49

The revised equity curve is lower than the original. Maximum drawdown also decreases, but the net profit-to-drawdown ratio deteriorates. These are simulated results for this particular model, not live trading performance.

In trading, nothing is for free. This is a perfect example of the trade-off. A protective stop serves a risk-management purpose, but adding one can also change the profitability of the underlying strategy. Sometimes that change is substantial. I want to understand both sides of the trade-off instead of assuming that adding a stop automatically improves every performance metric.

The automatic recommendation is therefore a useful starting point for comparison. It is not the end of my optimization process.

How to Read a 3D Exit Optimization Map

In BreakoutOS, I move to the combined SL/PT/BSE map to investigate the relationship between all three settings. The interface offers a heatmap, a surface optimization map and a 3D optimization map. For this explanation, I prefer the layered 3D view, although the surface view is another option.

The layered view makes the multidimensional search easier to interpret:

  • Each layer represents one BSE setting: 5, 10, 15 or 20 bars.
  • Within each layer, the two axes represent stop loss and profit target values.
  • Colors represent the selected performance or fitness metric, according to the displayed legend.
  • Tooltips allow us to inspect the settings and corresponding outcomes.

The plot displays 104 tiles from the 416 tested combinations. The interface can aggregate dense tiles using means, while tooltips provide exact tested values. This is another reason not to treat the color alone as a complete description of an individual result.

In the displayed maps, I focus on the stronger yellow and orange regions. But finding an attractive region in one map is not enough. What matters is whether the corresponding settings also behave well in the other sample.

Comparing In-Sample and Out-of-Sample Exit Settings

I split the optimization view so that the in-sample and out-of-sample maps appear side by side. The objective is to identify promising settings at the same coordinates in both views, rather than simply finding the strongest color somewhere in each chart.

One important distinction: I am looking at both samples to choose a candidate here. The platform assigns trades to samples by entry date, and the displayed out-of-sample results are diagnostic evidence, not an untouched final holdout.

Let’s look at the four BSE layers individually.

BSE setting Observation in this test
5 bars No desired yellow or orange region
10 bars No desired yellow or orange region
15 bars Orange regions appear, but do not overlap at the same settings
20 bars Strong regions overlap in the two views

For this particular run, I remove the first three layers from the display and concentrate on the 20-bar layer. That does not mean shorter holding periods are inherently unsuitable for breakout trading. It simply means that they do not meet the comparison criteria I am using in this example.

Evaluating the Stop Loss and Profit Target Candidates

Once I isolate the 20-bar layer, I can examine the overlap more closely. In this case, the stronger overlapping area appears near the edge of the tested range, including the corner corresponding to a $10,000 stop loss and a $15,000 profit target.

This is a different candidate from the initial $8,000 stop and $5,000 target suggested by the Auto Optimizer. It is a combination worth investigating based on the maps, not a proven optimum or a recommendation to trade those dollar amounts live.

There is also an alternative within the region: a smaller profit target may still produce attractive results. The map suggests more flexibility in the target than in the stop loss for this example. That is precisely the kind of information I want to extract from a multidimensional optimization.

Because the candidate is near the boundary of the tested grid, I would normally consider investigating additional ranges or finer increments before settling on a final choice. We could also extend the BSE settings to 25, 30 or 35 bars. Those additional tests are possibilities, not results demonstrated in this walkthrough.

Use Neighboring Values to Reduce Overfitting Risk

The key takeaway is exactly the same as in a simple BSE optimization: look at the neighboring values. I want to see whether modest changes to the stop loss, profit target or holding period still produce reasonably similar outcomes.

A strong result at a single isolated combination is less convincing than a broader region of strong results. When the same region behaves well in both displayed samples, and neighboring settings also behave similarly, I have more supporting evidence for the candidate. It is not a guarantee against overfitting or future losses.

I use the same principle in other areas of strategy development, as I explain in my guide to finding robust trading edges.

To summarize my trading exit optimization process: start with a working baseline, choose market-informed ranges, run the joint optimization, compare the suggested exits with the original strategy, inspect the same settings in both samples and evaluate neighboring values before settling on a candidate.

Do you use a similar approach when optimizing your trading exits? Let me know what you think. Meanwhile, happy trading.

Related Posts


Want to build and optimize breakout trading strategies without coding? Explore Breakout Trading PRO, the visual strategy builder inside BreakoutOS, and investigate how different exit settings affect your systematic trading models.