OPEN-SOURCE SCRIPT
Relative Strength vs. Benchmark (相對強度)

This "Relative Strength vs. Benchmark" indicator helps you see a stock's true performance against a benchmark (like the S&P 500) at a glance. By calculating the price ratio between the two, it strips away the overall market noise, allowing you to focus on identifying true market leaders and underperforming laggards.
How It Works
Core Formula: Relative Strength = Stock Price / Benchmark Index Price
A Rising Line: Means the stock is outperforming the benchmark.
A Falling Line: Means the stock is underperforming the benchmark.
The indicator also includes a Moving Average (MA) of the Relative Strength line itself. This MA helps to confirm the trend of relative strength and filter out short-term noise.
How to Use
Find Market Leaders: When the market is in an uptrend or consolidating, look for stocks whose RS line is breaking out to new highs.
Avoid Laggards: If the RS line is consistently below its moving average or making new lows, the stock is significantly underperforming the market and should be treated with caution.
Trend Change Signals: A cross of the RS line above its MA can be seen as a signal that a new trend of relative outperformance is beginning. A cross below suggests the trend is weakening.
Features & Settings
Customizable Benchmark: You can change the default benchmark from TWSE:TSE to any symbol you need, such as SP:SPX for the S&P 500 or NASDAQ:NDX for the Nasdaq 100.
Adjustable MA Length: Customize the period for the RS Moving Average to fit your trading style (short-term or long-term).
Visual Toggle: Easily turn the colored background fill on or off according to your preference.
Hope you find this tool helpful in your analysis!
How It Works
Core Formula: Relative Strength = Stock Price / Benchmark Index Price
A Rising Line: Means the stock is outperforming the benchmark.
A Falling Line: Means the stock is underperforming the benchmark.
The indicator also includes a Moving Average (MA) of the Relative Strength line itself. This MA helps to confirm the trend of relative strength and filter out short-term noise.
How to Use
Find Market Leaders: When the market is in an uptrend or consolidating, look for stocks whose RS line is breaking out to new highs.
Avoid Laggards: If the RS line is consistently below its moving average or making new lows, the stock is significantly underperforming the market and should be treated with caution.
Trend Change Signals: A cross of the RS line above its MA can be seen as a signal that a new trend of relative outperformance is beginning. A cross below suggests the trend is weakening.
Features & Settings
Customizable Benchmark: You can change the default benchmark from TWSE:TSE to any symbol you need, such as SP:SPX for the S&P 500 or NASDAQ:NDX for the Nasdaq 100.
Adjustable MA Length: Customize the period for the RS Moving Average to fit your trading style (short-term or long-term).
Visual Toggle: Easily turn the colored background fill on or off according to your preference.
Hope you find this tool helpful in your analysis!
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.