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.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
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.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
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.