PROTECTED SOURCE SCRIPT
Relative Strength Multi-Period

🔷 Relative Strength Multi-Period (vs Benchmark)
This indicator offers a powerful, customizable view of **relative strength (RS)** between the charted symbol and a benchmark (default: `NSE:NIFTY`). It's designed to help traders and analysts visually identify consistent outperformance or underperformance over multiple timeframes.
🧭 Key Features:
* 📈 **Multi-Timeframe RS Analysis**: Plots RS lines for three configurable periods (default: 21, 55, 123).
* ⚖️ **Benchmark Comparison**: Compare any symbol to a benchmark such as `NSE:NIFTY`, `SPX`, `BTCUSD`, or `BANKNIFTY`.
* 🟰 **Zero Line Reference**:
* RS > 0 → Symbol is outperforming the benchmark.
* RS < 0 → Underperforming.
* 🎨 **Smart Color Logic**:
* RS lines turn red when below zero and stay red until they cross back above — helping highlight persistent weakness.
🛠 Customization Options:
* ✅ Enable/disable RS lines individually.
* ✅ Select any benchmark symbol for comparison.
* ✅ Optional Moving Average on RS(21) to reduce noise.
* 🎛 MA period customizable (default: 10).
📊 Ideal Use Cases:
* Identifying **relative outperformers or laggards**.
* Supporting **sector rotation**, **momentum-based strategies**, or **trend confirmation**.
* Works across stocks, indices, cryptocurrencies, or forex pairs.
📌 Notes:
* This script is intended for use in the **indicator pane**, not on the main price chart.
* A separate overlay version can be used for candle-based visuals like EMA crossovers or signal markers.
⚠️ Disclaimer:
This script is for **educational and informational purposes only**. It does **not constitute financial advice or a buy/sell recommendation**. Always perform your own research and consult a licensed financial advisor before making trading decisions.
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。