Having shortlisted a basket of markets to trade, the next step is to determine your trading strategy entry.
Your strategy’s entry is arguably the most important element of your strategy. The exit has a significant impact on your bottom line, but it is the entry that determines your ability to accrue floating profits. Like the casinos’ edge in Vegas, a successful entry gives you the edge in trading.
Entry selection is the first step in the MT4 strategy development section, and will be followed by exit and filter section.
Continuing from the Market Research section, this article will illustrate an approach to select a trend following entry for the hourly GBPJPY. Three conceptually different entries will be backtested and their risk-adjusted returns will be evaluated. In keeping with Occam’s razor, only the lookback period will be optimized for each entry.
Technical indicators are the building blocks of most trading strategies. Although indicators typically lag behind price action, their ability to transform complicated price action into actionable numbers is invaluable to many retail traders.
Today’s trading platforms usually come preloaded with a vast array of indicators, though I believe there is redundancy among many of them. I prefer to use traditional indicators that have stood the test of time.
Many successful trading strategies use several technical indicators in concert with one another to determine entries and exits. Tweaking or augmenting your indicator’s logic to suit your trading preferences is also recommended.
Nevertheless, this article will focus on common ‘out of the box’ indicators, which when combined with appropriate exits and filtering, can lead to a profitable trading solution.
1. Bollinger Bands
Quite possibly the most popular indicator in retail trading, Bollinger Bands are a volatility-based channel indicator consisting of a simple moving average with price bands plotted at a standard deviation multiple above and below it.
By default, a 20-period lookback is used for the moving average, and 2 standard deviations are used for the bands. If prices were normally distributed, they would lie between the bands 95% of the time. In reality, due to occasional large price movements, this only happens about 85-90% of the time.
The beauty of the Bollinger Bands lies in its adaptive nature; the slope of the moving average indicates trend direction, while the band width indicates market volatility. The expansion of the bands during periods of high volatility serves as an automatic filter, helping to minimize ‘whipsaw’ trades.
Bollinger Bands can be used to generate entries for both countertrend and trend following strategies. For the latter, a longer lookback period of 50-100 is typically used. If prices have sufficient momentum to penetrate either band, a new trend may be developing. The chart below shows a long trade taken when prices closed above the 80-period upper Bollinger Band. The market eventually rallied 700 pips in a week.
If you’re countertrend trading instead, you can use the Bollinger Bands together with candlestick patterns to detect short-term price reversals.
An alternative to the Bollinger Bands is the Keltner Channels. I do a comparison of these indicators here.
2. Donchian Channels
Developed by Richard Donchian and made famous by the Turtles in the 1980s, Donchian channels are formed by plotting the highest high and the lowest low over the lookback period.
A middle line, computed as the average of the upper and lower lines, is sometimes plotted to indicate the ‘average’ price. The width of the channel is an indication of market volatility.
Just like Bollinger Bands, penetration of the channel implies strong momentum and is a plausible entry point for a trend trade. The chart below shows a GBPJPY short triggered by a lower penetration of the channel.
Considering the longevity of this indicator’s success over a variety of markets, it probably deserves your consideration.
3. Commodity Channel Index
Developed by Donald Lambert in 1980 to identify cyclical turns in commodities, the CCI has since achieved popularity in stocks and currencies as well.
The CCI measures the current price relative to an average price over the lookback period. Unlike the Bollinger Bands and Donchian channels above, the CCI uses typical price for its calculations.
Typical price (TP) is the average of the high, low, and closing prices. Some believe typical price provides a better representation of price action, compared to closing prices alone.
The calculation for a default 20-period CCI is:
The mean deviation is defined as:
Similar to other popular indicators like the RSI and Stochastic, the CCI is a measure of price momentum. However, it is not range-bound, and its high volatility often gives rise to ‘whipsaw’ trades. A smoothing function may be applied to the raw CCI value to alleviate this.
Although more commonly used to indicate overbought or oversold conditions, the CCI can be used for trend confirmation too. The +100 and -100 levels are usually the thresholds that indicate strong upside and downside momentum, respectively.
The chart below shows a long trade taken when the 80-period CCI closes above +100.
A reversal trend strategy will be programmed for each of the three entries above. Reversal strategies are always alternating between long and short positions; when a trade is closed, a trade in the opposite direction is immediately opened. No other trade management is necessary.
To summarize, the trading logic for the three strategies are:
Testing the entries in this ‘bare-bones’ reversal manner reveals the natural profile of the entry’s returns and risks. For example, compared to the CCI, you would expect the Donchian entry to have a lower trade frequency, higher win rate, and larger profit per trade.
For a more comprehensive assessment, each entry will have its lookback period optimized from 10-100, in steps of 1. This will give us a broader perspective of each indicator’s performance.
Entry rules are intentionally symmetrical for the long and short sides. Because it is very difficult to predict future market bias, having symmetrical rules is usually the prudent option.
MT4 Backtest Settings & Metrics
MT4’s strategy tester will be used for the entirety of this strategy development section. Its setup is shown below:
- Market: GBPJPY
- Timeframe: H1
- Test period: Jan 2015 – Dec 2019
- Backtest model: Open prices only
- Spread: 2 pips/round turn
Each strategy has its lookback period optimization configured as follows:
How about the performance metrics used to evaluate the success of each entry?
The MT4 optimizer report doesn’t provide many options. I want a simple risk-adjusted returns metric so I’ll use the return/maximum drawdown ratio.
This ratio is not offered by default, but you can open the report in Excel and divide the ‘Profit’ by the ‘Drawdown $’.
Entry Selection Results
Each entry’s net profit/maximum drawdown (NP/DD) was plotted as a function of its looback period. As explained in the basic concepts section, we are looking for high plateaus on the chart. These represent areas of strong and stable performance.
A few observations come to mind:
- This is not a textbook hump-shaped optimization chart with a conspicuous high plateau. Unless you test over a large range of fairly similar markets, your results will probably look messy like this.
- Short lookback periods of 25 and below lead to losing strategies for all three entries. In trend trading, short lookback periods cause many ‘whipsaw’ trades and are usually a recipe for disaster.
- For all entries, the optimal lookback period is at least 50.
The CCI entry seems to be the most promising, with the NP/DD peaks at about 55 and 85-period lookbacks. To confirm this, I computed the average NP/DD values across all the lookback periods for the three entries. CCI came in tops at 2.69, followed by Bollinger Bands at 2.30 and finally Donchian channels at 1.83.
Which lookback period should I use for the CCI entry? Looking at the two CCI peaks, the second one (pink box) is clearly more stable. I will pick a lookback period of 85, in the middle of this region. 288 trades were obtained over the 5-year backtest period, about one trade per week. A CCI(85) entry will thus be used for subsequent development of our trend strategy on the hourly GBPJPY.
One last note on entry testing: Do not proceed if majority of your optimizations show a loss. Good exits and filters may eventually make your strategy profitable, but you will always be swimming against the tide.
This article has demonstrated a practical method to select a profitable trading strategy entry.
Three popular technical indicators – the Bollinger Bands, Donchian channels, and Commodity Channel Index – were used to generate reversal entries for an hourly GBPJPY trend strategy. The best performer was an 85-period CCI, which will be used for the remainder of our trend strategy development using MT4.
An alternative entry selection method, which charts the entry’s profitability as the trade progresses, is described here.
Now that our entry rules are settled, let’s turn our attention to exits!