编辑精选OPEN-SOURCE SCRIPT

Industry Group Strength

已更新
The Industry Group Strength indicator is designed to help traders identify the best-performing stocks within specific industry groups. The movement of individual stocks is often closely tied to the overall performance of their industry. By focusing on industry groups, this indicator allows you to find the top-performing stocks within an industry.

Thanks to a recent Pine Script update, an indicator like this is now possible. Special thanks to PineCoders for introducing the dynamic requests feature.

How this indicator works:
The indicator contains predefined lists of stocks for each industry group. To be included in these lists, stocks must meet the following basic filters:

  • Market capitalization over 2B
  • Price greater than $10
  • Primary listing status


Once the relevant stocks are filtered, the indicator automatically recognizes the industry group of the current stock displayed on the chart. It then retrieves and displays data for that entire industry group.

Data Points Available:
The user can choose between three different data points to rank and compare stocks:

  • YTD (Year-To-Date) Return: Measures how much a stock has gained or lost since the start of the year.
  • RS Rating: A relative strength rating for a user-selected lookback period (explained below).
  • % Return: The percentage return over a user-selected lookback period.


Stock Ranking:
Stocks are ranked based on their performance within their respective industry groups, allowing users to easily identify which stocks are leading or lagging behind others in the same sector.

Visualization:
The indicator presents stocks in a table format, with performance metrics displayed both as text labels and color-coded lines. The color gradient represents the percentile rank, making it visually clear which stocks are outperforming or underperforming within their industry group.

Relative Strength (RS):
Relative Strength (RS) measures a stock’s performance relative to a benchmark, typically the S&P 500 (the default setting). It is calculated by dividing the closing price of the stock by the closing price of the S&P 500.

If the stock rises while the S&P 500 falls, or if the stock rises more sharply than the S&P 500, the RS value increases. Conversely, if the stock falls while the S&P 500 rises, the RS value decreases. This indicator normalizes the RS value into a range from 1 to 99, allowing for easier comparison across different stocks, regardless of their raw performance. This normalized RS value helps traders quickly assess how a stock is performing relative to others.

版本注释
update to label count
版本注释
Added data label next to industry group name. Fixed typo.
版本注释
Added the option for compact mode. This will show the industry group along with top tickers and their selected data. The data display can be turned off as well to only show top tickers.

快照
Breadth IndicatorsPortfolio managementTrend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


Trusted Pine programmer. Send me a message for script development.
更多:

免责声明