PROTECTED SOURCE SCRIPT

Relative Strength Multi-Period

27

🔷 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.


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.