OPEN-SOURCE SCRIPT

Multi-Ticker RS vs SPY

103
This Pine Script, titled "Multi-Ticker RS vs SPY," is a clean and efficient indicator designed for TradingView, enabling traders to monitor the relative strength (RS) of up to 10 ticker symbols compared to the S&P 500 ETF (SPY) on a single chart. Ideal for options traders, such as those managing a $1,400 account, it provides a simple way to assess which stocks are outperforming or underperforming the broader market. As of February 26, 2025, the script supports any chart timeframe, such as 5-minute or daily intervals, and calculates RS based on a user-defined lookback period, defaulting to 1 bar for real-time insights.
Users can input ticker symbols via customizable settings, with defaults set to popular stocks like AAPL, TSLA, NVDA, GOOGL, AMZN, MSFT, FB, NFLX, INTC, and PYPL. The script fetches closing prices for each ticker and SPY, computes their percentage changes over the lookback period, and determines RS as the ratio of each ticker’s change to SPY’s change, handling division by zero gracefully. It displays each ticker’s current RS score in a vertical column of labels on the chart’s top-left corner, updated on the last bar to avoid clutter. Users can adjust label size (tiny, small, normal, large) and text color for visibility, ensuring a tailored, error-free experience for quick market analysis.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.