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.
Script de código aberto
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.