OPEN-SOURCE SCRIPT

Relative Strength Buy/Sell Signals

98
This Pine Script builds on the MarketSurge-style Relative Strength indicator. It calculates the RS line by comparing the stock's close to a benchmark (default: SPY). Buy signals are generated when the RS line crosses above its moving average (default 10-period SMA), indicating improving relative strength. Sell signals occur when it crosses below, suggesting weakening relative strength. Signals are labeled "BUY" (green) and "SELL" (red) on the chart, with background highlights.
It also retains the new 52-week RS highs (orange circles) and lows (purple circles), which can serve as additional confirmation for outperformance or underperformance.
Note: This approximates relative strength for trading signals but does not replicate the proprietary IBD RS Rating (a 1-99 percentile rank across all stocks). For best results, use on daily charts and combine with other analysis. Backtest thoroughly, as no strategy guarantees profits

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.