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.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.