Ride Breakouts With This Support & Resistance Indicator!

May 19, 2021

StrategyQuant offers a support & resistance ranking indicator to help predict and detect breakouts. Let’s use it to program an automated 15-minute USDJPY strategy!

You can download the strategy below from the Free Strategies section.

If you’re a trend follower like me, the word ‘breakout’ is music to your ears.

An explosive breakout could signal the start of a major price trend.

If you trade manually, chart patterns like flags and triangles are often good predictors of upcoming breakouts.

Discerning chart patterns using a trading algorithm is rather challenging. Fortunately, we can circumvent this by using StrategyQuant’s support & resistance ranking (SR%) indicator.

What’s the Support & Resistance Ranking Indicator?

The SR% indicator is not available in MT4 by default; you can download it here.

The SR% calculates the percentage of time the current close falls within the high-low range of each candle in the lookback period.

Here’s a couple of examples to illustrate how it’s calculated. Let’s use a 5-bar lookback period for clarity.

The large bullish candle shows a breakout from a period of consolidation. This candle has a SR% of 0%, because its close lies outside the high-low range of all 5 candles in the lookback period.

At the other end of the spectrum, here we have a small candle that’s caught within a range. Its closing price is within the high-low range of all 5 candles before it, so its SR% is 100%.

Using the Support & Resistance Indicator With Breakouts

You want to look for a series of low SR% values.

If the SR% falls sharply, it likely indicates a breakout has occurred. Here’s an example with a 50-period SR%.

If the SR% falls gradually, prices have been closing near the boundaries of the current trading range. This increase in buying/selling pressure means a breakout could be imminent.

Ideally, you want to see these low SR% values after a long period of consolidation. These are often followed by explosive breakouts.

Programming a Breakout Strategy

Now that we know what to look out for, it’s time to convert our idea into an algorithm.

To exploit the increased buying/selling pressure, I will enter the market when the SR% 3% for the three most recent closes.

This can be programmed very easily in AlgoWizard:

  1. Basic Mode: The SR% will use the bar highs and lows to determine the trading range, as illustrated above. The alternative, ATR Mode, adds an ATR buffer to the trading range. The (high + ATR) and (low – ATR) for each bar are used for the upper and lower boundaries, respectively. This ATR mode gives a delayed but more reliable breakout signal.
  2. LookbackPeriod: The number of bars used to construct the trading range. I’ll use 80.
  3. ATRPeriod: ATR lookback period if you use the ATR mode. Not relevant in this case.
  4. Bar shift [1]: A shift of 1 refers to the most recently completed bar. [2] refers to the bar before that, and so on. All three conditions are identical except for the bar shift.
  5. Threshold: Percentage of time the current close falls within the trading range. I’ll use 3% here. For an 80-bar lookback, this means a maximum of 2 closes within the range.

Note that entry conditions are identical on the long and short sides.

This strategy actually reminds me of the classic Donchian channel breakout, where you go long when price closes above the highest high over the lookback period.

The Turtles used Donchian breakouts to great success in the 1980s.

A key difference is that the Donchian breakout condition only involves the most recent bar, whereas I’m looking at the three most recent bars here.

This should help focus on breakouts that are sustainable, instead of ‘fakeouts’ that quickly revert to the consolidation range.

The Support & Resistance + CCI Combo

I often use two or more conceptually distinct indicators when programming entry signals.

Awaiting confluence from two or more indicator types generally improves signal reliability.

Since the SR% indicator uses price action, I’ll pair it with a seriously underrated momentum indicator: the Commodity Channel Index (CCI).

The CCI measures the current price relative to an average price over a given lookback period. I’ll use a lookback period of 80, similar to that of the SR%.

I consider the market bullish when the CCI exceeds 100, and bearish when the CCI falls below -100. 

Long entries will have an additional CCI > 100 condition, while short entries will need CCI < -100. 

Time-Based Entry Filters and Exits

The periodic fluctuations in trading volume tend to have a large impact on short-term strategies. 

Since this breakout strategy trades on the 15-minute timeframe, I’ll only enter the market when trading volumes are high. 

The London open – New York midday window is usually when volumes are highest. A time filter was configured in AlgoWizard to only allow entries within this window. Don’t forget to use your broker’s time zone!

Lastly, since short-term strategies are most vulnerable to weekend gaps, I’ll prevent entries on Friday, and close all existing trades at Friday 3pm New York time.

Using Stop Entries for Confirmation

I like to use stop entries for breakout strategies, where some price confirmation is needed before I enter the market. 

The entry price is marginally worse, but the improvement in reliability is usually worth it.

For this strategy, buy stops will be placed at 1 ATR above the previous high. Sell stops will be placed 1 ATR below the previous low. Each stop entry will be valid for 3 bars.

With all the rules in place, here’s an example of a long entry.

Backtesting the Support & Resistance Strategy

At last, here’s the 10-year backtest on the USDJPY.

There are long periods of stagnation within the first 5 years. Can the strategy be improved?

I had a detailed look at the equity curve and toggled the overlays for maximum favourable excursion (MFE) and maximum adverse excursion (MAE).

The MFE is the trade’s maximum open profit over the duration of the trade, while the MAE is the maximum open loss.

Looking at the MFE plot above, there were numerous occasions where the strategy lost a large chunk of open profits. Perhaps there was a sharp trend reversal after an undesirable economic report.

Adding a profit target is a good way to minimize open profit giveback. Since this is a trend following strategy, I know I’ll need the occasional outsized win to make up for the relatively low win rate (<50%).

So I’ll add in a 300-pip profit target.

Here’s the new backtest.

Stagnation, return/drawdown and profit factor have all improved.

The 300-pip profit target may seem excessive, especially for a 15-minute strategy. It was only triggered 10 times over the 10-year backtest, but these outsized gains were enough to significantly improve overall results.

Were the Time Filter & CCI Entry Condition Effective?

I first removed the intraday time filter. This means the strategy can now enter the market any time of the day. 

The win rate only drops from 46% to 44%, but overall risk-adjusted performance is far worse. I’m keeping this filter for sure!

If I also remove the CCI entry condition, the strategy becomes untradable.

I think seeking confluence from different indicators, while keeping each indicator’s conditions ‘loose’, is the best way to go.

Wrapping Up

The support & resistance ranking indicator provides a simple way to detect increases in buying/selling pressure.

This can help you jump onboard the next breakout at the earliest opportunity.

Since the SR% indicator uses price action only, it’s best to complement it with momentum or trend detection indicators.

StrategyQuant’s analysis features are great for progressively improving your strategy. In this case, the MFE feature revealed that the strategy would benefit from a profit target. I recommend making 1-2 changes at most. Excessive tweaking will lead to overfitting.

Feel free to download the SR% strategy in the Free Strategies section!

Want to develop a portfolio of automated trading strategies?

Supercharge your strategy development with StrategyQuant

Access 14-day FREE trial here!

Get up to USD 300 discount!

Strategies need improvement?

Use QuantAnalyzer’s powerful analysis tools

Try the FREE version here!

Get 20% Discount here!

FXVM Forex VPS
Follow Us

Popular Posts

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more

What is Fixed Ratio Money Management?

Have you heard of fixed ratio money management? How does it compare to the popular fixed fractional approach? Here I’ll explain how fixed ratio works, and see how it stacks up against fixed fractional money management.

read more

Build a Diversified Portfolio With QuantAnalyzer

The ability to efficiently trade a diversified portfolio of strategies is one of the biggest advantages of algorithmic trading. Here we will use QuantAnalyzer’s Portfolio Master to build a portfolio consisting of high performing, uncorrelated strategies.

read more

What Is the QQE Indicator?

The QQE is a mysterious indicator that sometimes pops up in trading forums. Does it deserve a place alongside the more traditional momentum indicators like the RSI and CCI? Let’s add it to a trend following strategy to find out!

read more

Hey there, Wayne here! I’m on a mission to develop robust algorithmic trading strategies for the forex markets. Trading Tact is where I share my trading methods and insights.

Follow Us
Have a Question?

Comments

0 Comments

Submit a Comment

Your email address will not be published.

Want to develop a portfolio of automated trading strategies?

Supercharge your strategy development with StrategyQuant

Access 14-day FREE trial here!

Get up to USD 300 discount!

Strategies need improvement?

Use QuantAnalyzer’s powerful analysis tools

Try the FREE version here!

Get 20% Discount here!

FXVM Forex VPS

Recent Posts

How to Find a Real Trading Guru

How to Find a Real Trading Guru

Every day I come across a trading guru offering educational content on the internet. Many of them speak of huge returns with minimal effort. Should these be trusted? Here’s some tips on how to separate the wheat from the chaff.

read more
How to Enjoy Stress-Free Trading

How to Enjoy Stress-Free Trading

Trading is a great way to make some additional income, but not if you’re constantly pulling your hair out. Here I offer 7 tips to help make your trading profitable and stress-free.

read more
How to Get a Realistic Backtest Spread

How to Get a Realistic Backtest Spread

Your choice of backtest spread can certainly make or break a strategy. This post will show you how to study the intraday spread variations of your market, and suggest several ways to avoid paying ridiculous spreads.

read more
Laguerre RSI Trend Following Strategy

Laguerre RSI Trend Following Strategy

The Laguerre RSI attempts to improve the responsiveness of the regular RSI, whilst keeping whipsaw trades to a minimum. Let’s see how well it detects short-term pullbacks for a trend following strategy!

read more
Do You Know Your Strategy’s Optimization Profile?

Do You Know Your Strategy’s Optimization Profile?

Your strategy’s optimization profile often reveals its robustness, helping you select strategies that will remain profitable in live trading. Here I explain why an optimization profile is important, and how you can easily obtain one using StrategyQuant’s optimizer.

read more
How to Use the Supertrend Indicator

How to Use the Supertrend Indicator

Despite its cool name, the Supertrend indicator often seems to slip under the radar. Here I explain how it’s calculated, and combine it with moving averages to produce a simple trend following strategy.

read more
How to Select the Best Forex VPS

How to Select the Best Forex VPS

A virtual private server (VPS) is a virtual computer that you can rent and access remotely. It provides a reliable platform on which to execute your forex strategies. This post will help you decide whether you need a VPS, and show you how to select an optimal VPS.

read more
Out-of-sample Testing Using Monte Carlo Simulations

Out-of-sample Testing Using Monte Carlo Simulations

Traders often use Monte Carlo simulations to estimate worst-case drawdowns, but did you know they can be used for out-of-sample testing too? This post demonstrates the use of StrategyQuant’s Monte Carlo simulator to randomize historical prices and strategy parameters, helping you select robust strategies for live trading.

read more

Hey there, Wayne here! I’m on a mission to develop robust algorithmic trading strategies for the forex markets. Trading Tact is where I share my trading methods and insights.

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Make your money work for you!

Make your money work for you!

 

Get trading ideas and strategy development tips delivered to your inbox!

Thanks for subscribing!

Pin It on Pinterest

Share This