# Which Is The Best Indicator For Swing Trading?

Last Updated on October 19, 2022

**Which is the best indicator for swing trading?** There are many indicators to choose from, but in this article, we will try to answer which indicators that are best for this type of trading. There are many bells and whistles on the trading platforms, but we conclude that some indicators are much better than others.

**One of the least known or used indicators is the best one for swing trading: Williams %R. We test six indicators and base our conclusions not necessarily on the highest return, but rather on the indicator with the best risk-adjusted return. Return must always be compared to the max drawdown.**

Before we continue, let’s briefly define what we mean by swing trading:

## What is swing trading?

Swing trading involves taking positions for a short number of days, normally between one day (even overnight trading) to a few weeks, but rarely longer than a month. The time horizon is longer than day trading, but shorter than position trading, and certainly much shorter than long-term investing which often involves years.

Swing trading has the potential for high returns and low drawdowns. However, small drawdowns are hard to control, you need to be disciplined, and you need to work hard all the time to develop new strategies.

What is risk-adjusted return?

## What is risk-adjusted return in swing trading?

Risk-adjusted return is the relationship between the gross return compared to the maximum system drawdown (what is risk-adjusted return?). For example, if you have two systems with 15% annual returns, they might not be equal. It depends on how you got there.

As a swing trader, you prefer the least rocky path. You want to avoid bid drawdowns to minimize the probabilities of behavioral mistakes in trading.

Please read more about risk-adjusted return in our article about trading system performance metrics. Nevertheless, we copy and paste from that article how you can measure RAR/MDD:

First, we need to calculate the risk-adjusted return. This is the geometric return (annual) return in percent divided by the exposure in %. Exposure is the same as time spent in the market. If your strategy has 50 trades per year and makes 10% annual returns, this is more impressive than a strategy that returns the same but is invested 100% of the time. Time spent in the markets matter!

If the annual return is 15% and the exposure is 50%, then the risk-adjusted return is 15/0.5 = 30%

Now that we have defined the risk/adjusted return, we can calculate the RAR/MDD ratio assuming the max drawdown is 15%:

30/15 = 2

We would say that a metric better than 2 is very good.

As you can see, trading is all about risk and reward. Risk is defined as volatility and drawdowns. It’s not a perfect measure, but it is the best we have. Unfortunately, we can only calculate the risk of the past and not the risk of the future. We can only *assume* or *estimate* what the future risk is based on our backtests. Most traders assume they can stomach big drawdowns, but evidence indicates otherwise. Most people abandon ship in the middle of a storm.

Another risk, not frequently mentioned by pundits, is the win rate in trading. Most traders abandon a strategy after a few consecutive losses and this is why most traders struggle with trend-following strategies despite that trend-following works. Thus, always keep an eye on the win rate and the number of consecutive losers for a strategy.

## What is a trading indicator?

Before we go on to backtest, we briefly explain what a trading indicator for swing trading is.

Most indicators are oscillating – meaning they go up and down within some upper and lower bands. The security in question is overbought when the reading is high and oversold when the reading is low. Most of them are mean-reverting indicators.

An example of a mean-reverting oscillator is the RSI:

The price of the security is in the upper pane and the RSI indicator is in the lower pane. As you can see, the RSI moves up and down but at various strengths and intensities. A new high in the security is not necessarily accompanied by a new high in the indicator.

Luckily, there are other indicators such as ADX, moving averages, ATR, and many others. Please read more on our indicator guide.

## Which markets do we test?

This article backtest only on the S&P 500. We use the ETF with the ticker code SPY as a proxy.

The results in this article might deviate a lot depending on what assets you backtest. For example, mean reversion indicators don’t work well on gold and oil (or commodities in general), while it has worked very well on stocks since the early 1990s. There are no guarantees that mean reversion will continue working on stocks in the future!

## Which swing trading indicators do we test?

There are many to choose from but in this article, we focus on the most popular ones. Most of them are popular for a reason – many of them work pretty well, at least on stocks.

- The stochastic indicator
- Bollinger Bands
- The Williams %R indicator
- The relative strength indicator (RSI)
- WilliamsVixFix
- The internal bar strength (IBS) indicator

All of these indicators are previously covered in separate articles. Please click on the indicator to learn more.

There are, of course, plenty of other indicators to choose from. However, we have written about these six specific indicators in separate articles because they are the ones we found to be the best ones. It’s beyond the scope of this article to cover all **swing trading indicators**, but we believe the six indicators above are a pretty good sample to choose from!

## What is the best time frame for swing trading indicators?

The best time frame in trading depends on many variables. There can never be a fact in trading and there are no absolute answers, but swing trading has a rather short time frame, for most traders around 1-15 days. For any longer time frames, the drawdown most likely increases a lot.

You want to use your capital efficiently and that means hiding like a sniper and striking when you see the most obvious prey with the best risk and reward. Preferably you want to find many inefficiencies in the market and concentrate on them (and only them). At the same time, you want to employ your capital most of the time because your capital returns nothing when it’s idle. But keep in mind that often the best course of action is to sit on your hands and do nothing.

## How do we backtest the best indicators for swing trading?

We like to use Amibroker both for backtesting and live trading (please also check out our Amibroker course). To find the “sweet spot” we use Amibroker’s optimization function to check for durability, profitability, and negative skewness, just to name a few examples of optimization’s practical use.

We also use symmetry for the relevant indicator in action: If we for example enter when the RSI drops below 30 (30 from the bottom), we exit when it reaches 70 (30 from the top). This might not be a good entry, but not necessarily a good exit, but we use it to simplify. We recommend a previous article on this subject called how and when should you exit a trade.

We also assume the following::

- The time frame is 1-10 days
- We enter and exit at the close on the same day as the signal (read how to enter and exit at the close in practice)
- We use symmetry in entries and exits, ie. the opposite signals

Now that you know how we backtest the six different indicators, we can go on and perform the actual backtests. We start with what is probably the most famous **swing trading indicator** there is – the Relative Strength Index:

## Relative Strength Index (RSI)

The Relative Strength Index (RSI). was developed in the 1970s at a time when the personal computer was absent. Today we can scan multiple markets and indicators in seconds. Does it mean that the indicators have lost their power?

No, in the stock market they probably work just well now than they used to back then, as you’ll see with the RSI.

The RSI measures the magnitude of the gains and losses over a period of N days. The RSI can have a value between 0 and 100 and goes up and down, and the velocity increases as the number of days on the lookback period diminish. Here is an example (lower pane):

The chart uses a 7-day lookback period and it has rapid swings up and down.

Let’s jump to the backtest and run an optimization of the RSI and see how it performs:

Column one is the number of days in the lookback period while the second and third columns are the entry and exit levels. The primary rank is performed on the profit factor and the second rank is on the number of trades (the more trades the more reliable the result).

There are hard to see any “clusters” of where the sweet spot is. Let’s backtest a specific swing trading strategy by using a two-day RSI and entry when the RSI drops below 10 and exit when it rises to above 60:

The strategy has performed badly since 2015. Max drawdown during the covid mess in 2020 was rather high at 30% and we guess most traders would abandon the strategy by then.

Let’s move on to the next swing trading indicator:

## The Internal Bar Strength Indicator

The next indicator on our list is the Internal Bar Strength Indicator (IBS). The indicator goes up and down on a daily basis between 0 and 1. When the IBS is at 0 it means the close is equal to today’s low and at 1 it means the close is at today’s high. Of course, you can make moving averages of the value and choose lookback periods of several days.

Let’s optimize the IBS indicator by using a moving average of the IBS:

The number of days in the moving average is shown in the first column and the two next columns show the entry and exit criteria. The profit factor is more stable than the RSI and shows consistency.

The equity chart below shows when the two-day moving average the IBS closes below 0.3 and sells when it reaches 0.8:

The equity curve looks reasonably good despite the nasty drawdown in 2008/09.

We leave it like this and move on to the next swing trading indicator:

## Stochastics

To better understand The stochastic indicator we recommend our previous article covering what it is and what it measures. However, to sum up, stochastic is an indicator that has two lines: a fast line that is called %K and a slow line which is called %D.

Williams%R (see more of it below) is pretty similar to the %K. The %K formula looks like this (if we are using a five-day lookback period):

( close – low(5) ) /( High(5) – low(5) ) * 100.

The %D is a smoothed average of the %K. Many traders use crossovers of %K and %D but in this article, we only look at values of %K.

Below is an example of what the stochastic looks like on a chart (compared to RSI):

We can see the similarities, but at the same time, the movements are different.

Let’s go on and optimize the stochastic %K:

The stochastic indicator performs reasonably well and captures most of the best movements of the S&P 500, but we fail to see any particular pattern in both the number of days and the level of entry and exit.

Let’s pick one specific strategy and see what the equity curve looks like: we use 2 days as the lookback period and 10 and 70 for entry and exit:

The strategy performs very well, but it might be curve fitted a little too much (?). Nevertheless, stochastic perform pretty well when the lookback period is below 5 days.

Let’s go on to the next swing trading indicator:

## Bollinger bands

Again, please read our previous take on Bollinger Bands. Bollinger Bands were named after its inventor, John Bollinger.

The indicator has three moving bands:

- An upper band x number of standard deviations added to the moving average.
- The middle band is a moving average based on x days (usually an exponential or simple moving average).
- A lower band x standard deviations subtracted from the moving average.

If we want to use the Bollinger Bands as a mean-reverting indicator we would buy a break of the lower band and sell when the price breaks above the upper band.

Trend-followers would do the opposite: buy a break to the upside, and sell a break of the lower band. This might work on commodities and currencies, but is most likely not the best approach for stocks.

Let’s perform an optimization of the Bollinger Bands based on mean reversions:

The optimization indicates that the best lookback period is between 6 and 10 days, but they all have pretty big drawdowns.

Let’s pick a lookback period of 8 days and use one standard deviation for entry and 1.8 standard deviations for exit:

The end result is pretty good, but the drawdowns in 2003 and 2009 were pretty gut-wrenching. The reason for that is that the time spent in the market is pretty high and resembles a little like buy and hold.

Let’s leave Bollinger Bands and go to the next swing trading indicator:

## WilliamsVixFix

The famous trader and tax-rebellion Larry Williams wanted to make a duplicate of the VIX indicator and came up with the WilliamsVixFix. It’s a proxy for the real VIX (please read our article about what is the VIX?) and can be used on any ETF, stock, or any financial asset you like or trade.

In plain English WilliamsVixFix measures the following:

- The high over the last n days and subtract the low of today (or the current bar).
- Divide by the highest close of the past n days.
- The result is multiplied by 100 to “normalize” the indicator.

If we make a formula based on the three criteria above we get the following indicator (the real VIX in red at the bottom):

As you can see, both indicators look pretty similar, at least visually.

We can make an optimization by using a 10-day lookback period to better understand the profitability of the indicator. The “percentrank” function in Amibroker was used for the WilliamsVixFix (also read more about this function in the linked article about WilliamsVixFix):

The backtests were sorted on the profit factor column and the number of trades.

We took a random lookback period of ten days and we get the following equity chart:

The annual return (CAGR) is about 8.5% and the exposure (time spent in the market) is about 50%. But the drawdowns are quite high and frequent.

Let’s end the article with **the best indicator for swing trading**:

## Williams %R

We regard Williams%R as the **best swing trading indicator**. In this section, we argue why we consider Williams%R as the best swing trading indicator, but we recommend to read our earlier article which describes the Williams %R indicator.

As we mentioned earlier, Williams %R is a bit similar to stochastic: Both fluctuate between 0 to 100. Williams %R is a mean-reversion indicator and oscillates relative to the highest high for the lookback period. A high reading is considered overbought, and low readings are considered oversold.

Williams%R looks like this if we use a 5-day lookback period:

Compared to other swing trading indicators it goes much faster from overbought to oversold (and vice versa). It also has a negative value at all times.

Let’s run an optimization of Williams %R:

The first column shows the N-day lookback period, the second column is the entry level, and the third column shows the level where we exit. As in all other tests in this article, we ranked the results based on the profit factor and the number of trades.

Unlike stochastics and RSI, Williams%R performs better with a slightly higher number of days in the lookback period. A very low value is best for entry, but at the same time a minimalistic exit criteria is best (ie. a short holding time). The best settings have a holding time of about three days.

Let’s look at the equity curve of the second-best setting with a lookback period of 10 days, entry at -90, and exit at -80:

The blue line in the lower chart shows the drawdowns (which are pretty good (low) by all standards). Since 1993 this strategy has returned only two negative years: 2010 and 2018.

We have used Williams%R in one of our monthly trading edges. You can find more info here:

## Amibroker code for the best swing trading indicator

All backtests in the article were done in Amibroker. Amibroker is versatile and highly customizable and you can easily connect it to your broker and implement your backtests to your live trading. We have developed a pretty detailed Amibroker course on how you do this with Interactive Brokers.

Furthermore, all the code for the tests in this article (plus the code for all the other free trading strategies), can be ordered at this link:

## Conclusion: Which is the best indicator for swing trading?

Based on the backtests we regard the following three indicators as the best for swing trading:

- Williams %R
- Internal Bar Strength Indicator
- Stochastics

**Williams %R is the best indicator for swing trading!** But we regard the three on the top as pretty equal. What do we base this rank on?

We put Williams %R on top because it showed the most stable and solid results around all the different variables. Furthermore, Williams %R is the indicator that had the lowest average max drawdown, one of the most important parameters for a short-term trader. A low drawdown, all things being equal, means better risk-adjusted returns.