#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

## Rank Industries based on the average Relative Strength Index

by Caleb, 3120 days ago

To calculate the average 14-bar relative strength index of each U.S. industry, I have used the composite function and grouped stocks by the value returned by the "industry()" function. This function returns the industry name of a stock. By passing it to the composite function, the average calculation will not be computed for all stocks; instead, an average is calculated for each group of stocks (In this case, stocks that belong to the same industry).

Once we have the RSI average, we should rank the different industry RSI values using the composite function again with the "rank!" calculation method. We utilize the "rank!" instead of "rank" because the former returns the same rank for similar RSI values.

Example of using "rank": (Symbol - RSI - Rank - Industry)

MTN - 45.02 - 1 - Recreational Activities
MET - 44.01 - 2 - Insurance
MMC - 44.01 - 3 - Insurance

Example of using "rank!":

MTN - 45.02 - 1 - Recreational Activities
MET - 44.01 - 2 - Insurance
MMC - 44.01 - 2 - Insurance

Given the above example, it is easy to understand why we need the "rank!" method.

The current screen displays the close price, industry name, average industry RSI and the RSI rank for each stock.

Example of usage:
- Get stocks that belong to the top four industries based on their average RSI:
filter = var2 <= 4; // var2 is calculated in the screen formula

If you don't have industry name associated with your ticker symbols then you can use one of the following downloaders to get this data:
Update the Industry Name of your U.S. Stocks
Industry and Sector Information for the US Stock Market

What is this?

 Type: Screen Object ID: 1006 Country: All Market: All Style: Technical Analysis

Related objects
Show All
Percentile Rank of PEG, Price/Free Cash Flow and Price/Sales (by Brian Brown, uploaded several months ago)
No notes
 50
Industry Measure: Ratio of Bullish to Bearish All-Star Traders Picks (by Brian Brown, uploaded several months ago)
No notes
 39
No notes
 104
No notes
 134
Stocks outperforming the S&P 500 with low volatility (by Tom Huggens, uploaded several months ago)
No notes
 98
Bullish Pullback Strategy (by owen1987, uploaded several months ago)
No notes
 143
Volume High (by srishail, uploaded several months ago)
No notes
 64
Number of reviews
Average rate
Click to rate this item
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

 Random Blog Posts Buy the best/top rated stocks or how to create powerful rank based trading systems Ranking stocks based on their correlation with the S&P 500 Index Creating Stock & Market Short Interest Ratios using Historical Short Sale Data Select the best ETFs combination to maximize your return and reduce your investment risk How to turn any ordinary trading strategy into a very profitable one Charting & Scripts - Manage stock charts using the global script Trading System: Buy Stocks based on their Sharpe Ratio Rank Creating and managing notes for your stocks Show All

Number of reviews
Average rate
Click to rate this item
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object