OPEN-SOURCE SCRIPT

RS Rating Multi-Timeframe

68
RS Rating Multi-Timeframe (IBD-Style Relative Strength)
Short Description:
IBD-style Relative Strength Rating (1-99) comparing any stock's performance vs the S&P 500 across multiple timeframes.
Full Description:
Overview
This indicator calculates an IBD-style Relative Strength (RS) Rating that measures a stock's price performance relative to the S&P 500 over the past 12 months. The rating scale ranges from 1 (weakest) to 99 (strongest), telling you how a stock ranks against all other stocks in terms of relative performance.
How It Works
The RS Rating uses a weighted formula based on quarterly performance:

Last 63 days (1 quarter): 40% weight
Last 126 days (2 quarters): 20% weight
Last 189 days (3 quarters): 20% weight
Last 252 days (4 quarters): 20% weight

This weighting emphasizes recent performance while still accounting for longer-term strength.
Rating Interpretation

90-99 (Elite): Top 10% of all stocks - exceptional relative strength
80-89 (Excellent): Top 20% - strong leadership candidates
50-79 (Average): Middle of the pack
30-49 (Below Average): Underperforming the market
1-29 (Weak): Bottom 30% - avoid or consider shorting

Features

Multi-Timeframe: Works on any timeframe from 1-hour to weekly (always uses daily data for calculation)
Moving Average: Optional EMA or SMA of the RS Rating to smooth signals
Visual Zones: Color-coded zones for quick identification of strength/weakness
Signal Markers: Triangles appear when RS crosses key levels (80 and 30)
Info Table: Displays current RS Rating, change, MA value, and raw score
Alerts: Built-in alerts for key crossover events

Settings

Show Moving Average: Toggle MA line on/off
MA Length: Period for the moving average (default: 10)
MA Type: Choose between EMA or SMA
Benchmark Index: Change the comparison index (default: SP:SPX)
Show Rating Table: Toggle the info table on/off

How To Use

Buy candidates: Look for stocks with RS Rating above 80, ideally rising
Avoid: Stocks with RS Rating below 30 or falling rapidly
Confirmation: Use RS above its moving average as additional confirmation
Divergence: Watch for RS making new highs before price (bullish) or new lows before price (bearish)

Credits
RS Rating calculation methodology inspired by Investor's Business Daily (IBD) and adapted from Fred6724's RS Rating script. Percentile calibration based on analysis of ~6,600 US stocks.

Tags: relative strength, RS rating, IBD, momentum, CAN SLIM, benchmark, SPX, market leaders, stock ranking
Category: Relative Strength

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。