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!
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.