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
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.