Scanning for Relative Strength

Scanning for Relative Strength

Relative Strength scans are commonly used to find stocks that are outperforming their benchmark. These scans are “relatively” simple to create: just choose your benchmark index, then decide how you want to measure relative strength.

Choosing a Benchmark Index

Chartists often choose the benchmark index first, and then scan the member stocks in that index. For example, you could use the Dow Jones Industrial Average ($INDU) as the benchmark index, and scan for Dow Jones Industrial Average component stocks that are doing better than $INDU.

However, you don't have to use an index and its members. For example, the NASDAQ 100 ETF (QQQ) would be well-suited as a benchmark for large-cap technology stocks, even though the NASDAQ 100 is not exclusively made up of tech stocks. Similarly, $TSX is often used as a benchmark for the entire Toronto Stock Exchange, even though the index does not cover 100% of stocks traded on that exchange.

In this example, we're going to compare the performance of S&P 500 members with the performance of the S&P 500 Index ($SPX).

Choosing a Relative Strength Measurement

The Rate of Change (ROC) indicator is frequently used to measure relative strength, but other momentum indicators can be used too. For example, some chartists prefer to use the Relative Strength Index (RSI), looking for stocks with an RSI value higher than the benchmark. You can also use the PctChange() function or simple multiplication to calculate momentum.

Learn More: Rate of Change (ROC) | Relative Strength Index (RSI) | Percent Change Scans

In this example, we're going to compare the ROC values for three different timeframes (5-day, 10-day, and 20-day) against the benchmark.

Determining Benchmark Values

The first step is to get the benchmark's current value for your chosen relative strength measurement. Depending on the measurement you chose, you can do this by running a quick scan or just looking at a chart for the benchmark.

Here is an example of a scan that will tell you the 5-day ROC value for $SPX:

[symbol is '$SPX']

The scan looks for symbols that are $SPX (so the results will be limited to just the benchmark symbol we are looking for). The RANK BY clause displays the ROC(5) value for the symbol in the scan results.

However, in our example, we need to find three different values: the 5-day, 10-day, and 20-day ROC for $SPX.

In that case, it might be easier to build a SharpChart that shows all three values at once, like this:

Click here for a live version of the chart.

The chart above shows the S&P 500 with three different rates of change: 5-day, 10-day, and 20-day. $SPX is up 2.46% over the last 5 days, up 2.83% over the last 10 days, and up 0.43% over the last 20 days. Stocks with a higher Rate of Change over the corresponding periods show relative strength. Those with a lower Rate of Change show relative weakness.

Tip: If you plan to use your relative strength scan again, we recommend saving this chart to a ChartList. Then you can quickly call it up to get the latest ROC values every time you want to run the scan.

Building the Relative Strength Scan

Once we've got the current ROC values for the benchmark, we can build a scan using those numbers:

[group is SP500]
and [ROC(5) > 2.46]
and [ROC(10) > 2.83]
and [ROC(20) > 0.43]

The first line limits our results to S&P 500 member stocks. The other lines require that the stock's 5-day, 10-day, and 20-day ROC values are all higher than the corresponding values we found for $SPX.

Notice that we plugged in the exact $SPX numbers we found on the chart. You may or may not wish to enter a higher number. For example, you may want to require ROC(5) to be greater than 3, rather than 2.46, so your scan results have an ROC(5) value that is significantly higher than the benchmark.

Refining Scan Results

Even though we are requiring stocks to outperform the benchmark over all three time periods, we still have quite a few scan results:

Other criteria can be added to further narrow the results. For example, users could look for stocks with oversold conditions, an upturn in MACD, or a CCI buy signal. In this example, we added CCI Buy Signal criteria from the Predefined Scans dropdown menu in the Advanced Scan Workbench. Adding CCI buy signal criteria to the scan significantly reduced the results:

Once you're happy with your scan, be sure to save it so that you can use it again in the future.

Updating the Scan

Since we manually entered the benchmark values for our three ROC measurements in the scan, they won't be updated automatically as $SPX changes over time. Each time you run the scan, you'll need to determine the current values for the three ROC measurements and plug them in to the scan. If you saved your chart to a ChartList earlier, then it'll be easy to call up the chart and get the new values.


Relative Strength is a great way to scan for stocks that are outperforming their benchmark. The values for the benchmark do need to be changed manually each time you run the scan, but a combination of saved scans and saved charts make this quick and easy to do.