OPEN-SOURCE SCRIPT
RS Rating (Relative Strength) - Clean Table UI

This indicator calculates the Relative Strength (RS) Rating of a stock compared to the S&P 500 (SPY) and displays it as a clean, simple numerical value in a customizable table on your chart.
Unlike many complex swing data indicators that clutter your screen with moving averages, background colors, and multiple data points, this script is specifically designed for minimalist traders, day traders, and scalpers who only need to see the core RS Rating score at a single glance.
How It Works:
Core Calculation: It uses the standard weighted formula for 1-year performance (40% for the most recent quarter, and 20% for each of the previous three quarters) compared against the S&P 500 benchmark.
Percentile Ranking (1-99): Using market environment seed data, the raw score is converted into a true 1 to 99 percentile ranking. For example, an RS Rating of 85 means the stock is currently outperforming 85% of the overall market.
Color-Coded Signals: The numerical value automatically changes color based on the stock's momentum:
Green (>= 80): Strong market leader.
Red (<= 40): Weak laggard.
Custom/White: Neutral performance.
Features:
Zero Chart Clutter: No lines or shapes plotted over your candles. Just a single, elegant table.
Fully Customizable: You can easily change the table's position (Top/Bottom, Left/Right) and text size (Normal, Large, Huge) directly from the indicator settings to fit your exact workspace layout.
(Credits to the original open-source community and Fred6724 for the percentile mapping seed function utilized to power this clean UI version).
Unlike many complex swing data indicators that clutter your screen with moving averages, background colors, and multiple data points, this script is specifically designed for minimalist traders, day traders, and scalpers who only need to see the core RS Rating score at a single glance.
How It Works:
Core Calculation: It uses the standard weighted formula for 1-year performance (40% for the most recent quarter, and 20% for each of the previous three quarters) compared against the S&P 500 benchmark.
Percentile Ranking (1-99): Using market environment seed data, the raw score is converted into a true 1 to 99 percentile ranking. For example, an RS Rating of 85 means the stock is currently outperforming 85% of the overall market.
Color-Coded Signals: The numerical value automatically changes color based on the stock's momentum:
Green (>= 80): Strong market leader.
Red (<= 40): Weak laggard.
Custom/White: Neutral performance.
Features:
Zero Chart Clutter: No lines or shapes plotted over your candles. Just a single, elegant table.
Fully Customizable: You can easily change the table's position (Top/Bottom, Left/Right) and text size (Normal, Large, Huge) directly from the indicator settings to fit your exact workspace layout.
(Credits to the original open-source community and Fred6724 for the percentile mapping seed function utilized to power this clean UI version).
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.