The Strategic Trader
Detailed Strategy Evaluation

Monthly Archives: March 2011

Exit Strategy Part 1

Entries are important, but exits are where you make your money. A strategy can not be complete without fine tuning both sides. In this article series I will explore various exit strategies to determine which are effective and which are not. The end goal is to create an exit strategy that makes a random entry strategy profitable.

To succeed the exit strategy must remain profitable over 100 continuous runs with an average profit factor over 1.2. The random entry strategy will target 5,000 trades over the testing period. This is a rather lofty goal. In fact, it may not even be possible. However, we can learn a lot about various exit strategies and dynamics by attempting it.

Time Based Exits
This is a very simple concept. Exit after x number of bars have passed. We use this method often while evaluating entries because it provides a good reference point.

As we already knew, this method fails to make a random entry strategy profitable. The best results were only able to achieve 44 of 100 runs profitable and -$2,000 average profit.

Trailing Stops – Ticks
I will use NinjaTrader’s SetTrailStop() method set to CalculationMode.Ticks.


No combination produced a single profitable run.

Close > Close 1 Bar Ago
The strategy will exit if Close > Close 1 Bar Ago.


This was a a big surprise. The strategy was actually profitable on 88 of 100 runs with an average profit of +$8,823.  PF = 1.05, WIN % 68

Close < Close 1 Bar Ago
The strategy will exit if Close < Close 1 Bar Ago.


Only profitable in 5 runs

Close < Low 1 Bar Ago
The strategy will exit if Close < Low 1 Bar Ago.


15/100 Runs

Close > High 1 Bar Ago
The strategy will exit if Close > High 1 Bar Ago.


Profitable in 92/100 runs. Average Profit +$15,931 PF = 1.07 Win % 68

RSI(30) > threshold
The strategy will exit when RSI is above a certain threshold. When testing RSI we determined there was an edge to short when RSI went above a threshold. Therefore, we can assume it may be a good time to exit long positions.


As expected the strategy performed well. Profitable in 82 runs. Average Profit +$10,131 PF = 1.04 Win % 71


So far we have only looked at very simple exit logic and already see that reaching our goal may be possible. Future articles will be one article per exit strategy as we begin to tackle much more complex exit strategies.

Related Posts:


RSI Part 9: Risk/Reward

Before temporarily moving away from RSI, I want to evaluate each method one more time using the risk/reward test discussed in this article: Risk/Reward Testing

Crossing Above a Threshold:
Surprisingly many parameter combinations performed very well. Unfortunately, no combinations were able to exceed our desired targets.

Crossing Below a Threshold:
This method performed horrible based on this metric. This is what I thought might happen, and the reason I wanted to perform this test. Buying when oversold is a high percentage play if your nimble. But from a risk/reward standpoint its a hard strategy to trade.

Normal Divergence:
This method still did not contain any tradeable edge. Performs very poorly.

Hidden Divergence:
No combination was able to exceed our lofty targets, however several combinations missed by only fractions of a percent. This further underscores the fact that RSI Hidden Divergence contains a tradeable edge.

Related Posts:


Testing setup: Risk/Reward

I believe any tradeable edge should find trades that quickly become profitable. However, there are many ways to make money. We should also evaluate a strategy based on its risk/reward profile. A strategy may not be profitable 3 or 5 bars into the future like we have been testing, but may still signify a turning point with low risk. Before evaluating strategies based on risk/reward we have to establish a baseline to eliminate bias in our data set.

In this article, we will once again be running random simulations. We will use a 1:2 risk:reward ratio. Entries will be random based on the target number of trades (500,1500,5000). The strategy will set a profit target 3 *ATR(14) above the closing price and a stop loss 1.5 * ATR(14) below the closing price. The strategy will exit when the first target is hit or end of the day. Whichever comes first. After 100 random simulations we will then average all of the results and produce targets like we did in this article: Testing Setup

Baseline Results for 5,000 trades (Long):

Percent Profitable: 34.18%
Expected Return:  -$29,377
Target Percent: 36.86%
Target Return: +$38,493

Baseline Results for 1,500 trades (Long):

Percent Profitable: 34.37%
Expected Return:  -$8,587
Target Percent: 40.79%
Target Return: +$36,331

Baseline Results for 500 trades (Long):

Percent Profitable: 34.73%
Expected Return:  -$1,886
Target Percent: 45.54%
Target Return: +$26,455

Now we will perform the same simulations to determine the bias for short trades. We are still using a 1:2 risk/reward ratio.

Baseline Results for 5,000 trades (Short):

Percent Profitable: 32.23%
Expected Return:  -$34,763
Target Percent: 34.8%
Target Return: +$33,439

Baseline Results for 1,500 trades (Short):

Percent Profitable: 31.98%
Expected Return:  -$11,147
Target Percent: 37.69%
Target Return: +$32,599

Baseline Results for 500 trades (Short):

Percent Profitable: 31.58%
Expected Return:  -$4,478
Target Percent: 40.94%
Target Return: +$21,362

Based on these results it is very clear that using a 1:2 risk/reward ratio requires a great entry. I believe the random entries fared so poorly due to all of the noise in the markets. This should serve as a good indicator when comparing edges.

Source Code:

Download Source

Related Posts:



Designed by Get Paid Online and coded by Australian Survey Sites and Cashcrate.