PROTECTED SOURCE SCRIPT
IBD Style RS Rating Line Indicator

Purpose
RS Line
RS New Highs / New Lows
RS Rating (1–99)
Fallback Logic
Output
- Measures relative performance, not just price action.
- Recreates the IBD-style 1–99 RS Rating inside TradingView.
RS Line
- Plots stock price relative to a benchmark (default: SPX).
- Scaled for readability; supports indices and sectors.
- Optional MA overlays and positive/negative fill zones.
RS New Highs / New Lows
- Scans a user-defined lookback.
- Marks RS new highs (blue) and new lows (red).
- Modes for historical, last-bar-only, or “RS leads price.”
RS Rating (1–99)
- Calculates a weighted performance score over 1–12 months.
- Compares this score to market-wide thresholds pulled via request.seed().
- Converts score into percentile bands (e.g., 70–89, 90–98).
- Assigns 99 to top leaders and 1 to laggards.
Fallback Logic
- Missing environment data = shows “RS” without a number.
- Replay mode uses fixed thresholds to approximate ratings.
Output
- Clean label showing RS Rating near the RS line.
- Helps traders instantly judge whether a stock is a true leader.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由使用,沒有任何限制 — 點擊此處了解更多。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。