OPEN-SOURCE SCRIPT

NBSG_RelativeStrength_Labels

34
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.

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.