OPEN-SOURCE SCRIPT
NBSG_RelativeStrength_Labels

OVERVIEW
The Relative Strength (RS) Rolling Labels is a minimalist, high-utility analysis tool that provides an at-a-glance comparison of an asset’s performance against a primary market benchmark (default: CBOE: SPX). While many traders use fixed calendar months for relative strength, this indicator utilizes Rolling Trading-Day Windows (21, 63, and 126 sessions). This ensures that your momentum data is always current and consistent, regardless of the day of the month, providing a superior signal for active day and swing traders.
KEY FEATURES
Rolling Lookbacks: Uses 21D (1M), 63D (3M), and 126D (6M) trading-day periods for a consistent rate-of-change calculation.Institutional Benchmark: Locked to CBOE: SPX by default for high-fidelity index tracking.Dynamic UI: A clean, minimalist table that stays pinned to your chart corner, providing critical data without cluttering your price action.Conditional Coloring: Instantly identify outperformance (Green) or underperformance (Red) relative to the broader market.
CALCULATION LOGIC
Relative Strength is calculated by determining the percentage return of the chart's current asset and subtracting the percentage return of the benchmark over the same rolling period:$
RS = (\text{Asset Return} \%) - (\text{Benchmark Return} \%)$$A positive value indicates the asset is "winning" against the index, while a negative value indicates it is lagging.
USAGE
This script is best used on a Daily (D) timeframe for maximum precision, though it is programmed to pull Daily data regardless of your active chart timeframe. It is a vital tool for traders looking to "buy strength and sell weakness" by identifying assets that are holding up or leading when the broader market is under pressure.
DISCLAIMER
This script is an informational tool and does not constitute financial advice. Always use proper risk management and size your positions according to your individual trading plan.
The Relative Strength (RS) Rolling Labels is a minimalist, high-utility analysis tool that provides an at-a-glance comparison of an asset’s performance against a primary market benchmark (default: CBOE: SPX). While many traders use fixed calendar months for relative strength, this indicator utilizes Rolling Trading-Day Windows (21, 63, and 126 sessions). This ensures that your momentum data is always current and consistent, regardless of the day of the month, providing a superior signal for active day and swing traders.
KEY FEATURES
Rolling Lookbacks: Uses 21D (1M), 63D (3M), and 126D (6M) trading-day periods for a consistent rate-of-change calculation.Institutional Benchmark: Locked to CBOE: SPX by default for high-fidelity index tracking.Dynamic UI: A clean, minimalist table that stays pinned to your chart corner, providing critical data without cluttering your price action.Conditional Coloring: Instantly identify outperformance (Green) or underperformance (Red) relative to the broader market.
CALCULATION LOGIC
Relative Strength is calculated by determining the percentage return of the chart's current asset and subtracting the percentage return of the benchmark over the same rolling period:$
USAGE
This script is best used on a Daily (D) timeframe for maximum precision, though it is programmed to pull Daily data regardless of your active chart timeframe. It is a vital tool for traders looking to "buy strength and sell weakness" by identifying assets that are holding up or leading when the broader market is under pressure.
DISCLAIMER
This script is an informational tool and does not constitute financial advice. Always use proper risk management and size your positions according to your individual trading plan.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。