OPEN-SOURCE SCRIPT
Güncellendi Relative Strength Table

Relative Strength Table
1. Overview and Key Features
The Relative Strength Table is an indicator that compares multiple tickers against a benchmark (default: SPY) and displays their relative strength.
It is designed to help analyze stock leadership, sector trends, and portfolio performance in one consolidated table.
You can freely input up to 20 tickers from the Inputs panel, allowing flexible comparisons.
(If 20 tickers feel too limited, let me know in the comments — I’ll expand it.)
2. How the RS Percentile Is Calculated and What It Means
The RS Percentile shows how strong the current price ratio is compared to past data, expressed as a percentile rank.
First, the indicator calculates the price ratio by dividing the ticker’s close by the benchmark’s close.
Then, it compares the latest ratio with historical ratio data and determines its percentile value.
Examples:
・80% or higher → relatively strong
・Around 50% → neutral
・40% or below → relatively weak
3. Indicator Features and Customization
3-1. RS Lookback Settings
You can set up to four lookback periods for RS calculation and customize the bar count for each.
Default values are 5, 21, 63, and 126 bars.
You can choose which column to sort by, and the selected column is marked with an asterisk.
Each RS column can be shown or hidden individually via checkboxes.
3-2. Visual Highlight Settings
Relative strength can be color-coded for clarity.
You can freely customize:
・Highlight colors
・Threshold values
・On/off toggles for each highlight layer
3-3. Default Tickers and Reset Function
These 16 sector ETFs are included as the default ticker set:
QQQ, QQQE, RSP, DIA, IWM, XLV, XLE, XLF, XLRE, XLB, XLP, XLU, XLY, XLK, XLC, XLI
You can return to the default list anytime by pressing the refresh button next to the ticker fields.
4. Use Cases and Analysis Examples
4-1. Sector Rotation Analysis
By comparing RS across multiple periods, you can easily identify:
・Sectors gaining short-term strength
・Sectors with steady long-term inflows
A sharp rise in short-term RS may signal the early stages of a rotation.
4-2. Identifying Leaders Within a Sector
You can compare up to 20 tickers at once, making it easy to spot true sector leaders.
4-3. Objective Evaluation of Portfolio Holdings
By entering your portfolio tickers, you can instantly see:
・Whether each name is outperforming or underperforming
・Which timeframes show strength
・How each ticker compares to the benchmark
1. Overview and Key Features
The Relative Strength Table is an indicator that compares multiple tickers against a benchmark (default: SPY) and displays their relative strength.
It is designed to help analyze stock leadership, sector trends, and portfolio performance in one consolidated table.
You can freely input up to 20 tickers from the Inputs panel, allowing flexible comparisons.
(If 20 tickers feel too limited, let me know in the comments — I’ll expand it.)
2. How the RS Percentile Is Calculated and What It Means
The RS Percentile shows how strong the current price ratio is compared to past data, expressed as a percentile rank.
First, the indicator calculates the price ratio by dividing the ticker’s close by the benchmark’s close.
Then, it compares the latest ratio with historical ratio data and determines its percentile value.
Examples:
・80% or higher → relatively strong
・Around 50% → neutral
・40% or below → relatively weak
3. Indicator Features and Customization
3-1. RS Lookback Settings
You can set up to four lookback periods for RS calculation and customize the bar count for each.
Default values are 5, 21, 63, and 126 bars.
You can choose which column to sort by, and the selected column is marked with an asterisk.
Each RS column can be shown or hidden individually via checkboxes.
3-2. Visual Highlight Settings
Relative strength can be color-coded for clarity.
You can freely customize:
・Highlight colors
・Threshold values
・On/off toggles for each highlight layer
3-3. Default Tickers and Reset Function
These 16 sector ETFs are included as the default ticker set:
QQQ, QQQE, RSP, DIA, IWM, XLV, XLE, XLF, XLRE, XLB, XLP, XLU, XLY, XLK, XLC, XLI
You can return to the default list anytime by pressing the refresh button next to the ticker fields.
4. Use Cases and Analysis Examples
4-1. Sector Rotation Analysis
By comparing RS across multiple periods, you can easily identify:
・Sectors gaining short-term strength
・Sectors with steady long-term inflows
A sharp rise in short-term RS may signal the early stages of a rotation.
4-2. Identifying Leaders Within a Sector
You can compare up to 20 tickers at once, making it easy to spot true sector leaders.
4-3. Objective Evaluation of Portfolio Holdings
By entering your portfolio tickers, you can instantly see:
・Whether each name is outperforming or underperforming
・Which timeframes show strength
・How each ticker compares to the benchmark
Sürüm Notları
Updated to Pine Script version 6.Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının yaratıcısı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının yaratıcısı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.