OPEN-SOURCE SCRIPT
RSI Divergence Engine | Index | Stocks | Options

RSI Divergence Engine with Dynamic SL/TP
An automated momentum divergence indicator designed to identify high-probability trend reversal setups across 30–40 bar swing windows.
🌟 Key Features
Positive & Negative Divergence: Automatically detects both Bullish (BUY) and Bearish (SELL) price/RSI momentum mismatches.
Filtered Entries: Requires RSI to cross oversold/overbought thresholds (RSI ≤ 45 for BUY, RSI ≥ 55 for SELL) to eliminate mid-range market noise.
Automated SL/TP Lines: Draws clear Entry (Blue), Structural Stop Loss (Red), and Take Profit (Green) lines directly on your chart based on your Risk-to-Reward Ratio (RRR).
200 EMA Overlay: Built-in trend filter line to align divergence trades with the major trend direction.
How to Trade
1. BUY Signal: Look for green labels when price forms a Lower Low while RSI forms a Higher Low in oversold territory.
2. SELL Signal: Look for red labels when price forms a Higher High while RSI forms a Lower High in overbought territory.
3. Execution: Use the dynamically generated Red line for Stop Loss placement and target the Green line for exit.
Recommended Timeframes: 3m, 5m, and 15m intraday charts.
*Disclaimer: For educational and analytical purposes only. Always manage your risk carefully.*
---
Drop your thoughts, backtest results, or questions in the comments below!
An automated momentum divergence indicator designed to identify high-probability trend reversal setups across 30–40 bar swing windows.
🌟 Key Features
Positive & Negative Divergence: Automatically detects both Bullish (BUY) and Bearish (SELL) price/RSI momentum mismatches.
Filtered Entries: Requires RSI to cross oversold/overbought thresholds (RSI ≤ 45 for BUY, RSI ≥ 55 for SELL) to eliminate mid-range market noise.
Automated SL/TP Lines: Draws clear Entry (Blue), Structural Stop Loss (Red), and Take Profit (Green) lines directly on your chart based on your Risk-to-Reward Ratio (RRR).
200 EMA Overlay: Built-in trend filter line to align divergence trades with the major trend direction.
How to Trade
1. BUY Signal: Look for green labels when price forms a Lower Low while RSI forms a Higher Low in oversold territory.
2. SELL Signal: Look for red labels when price forms a Higher High while RSI forms a Lower High in overbought territory.
3. Execution: Use the dynamically generated Red line for Stop Loss placement and target the Green line for exit.
Recommended Timeframes: 3m, 5m, and 15m intraday charts.
*Disclaimer: For educational and analytical purposes only. Always manage your risk carefully.*
---
Drop your thoughts, backtest results, or questions in the comments below!
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.