PROTECTED SOURCE SCRIPT
DrNon RSI Divergence

RSI Divergence Strategy (Long Entry + RSI Filter)
Concept:
This strategy combines classic RSI bullish divergence with a low RSI entry filter to catch early trend reversals in oversold zones.
It aims to identify high-probability turning points where price forms a lower low while RSI makes a higher low, indicating weakening downside momentum.
Entry Logic
• Bullish Divergence detected between price and RSI
→ Price makes a Lower Low, RSI makes a Higher Low
• RSI < Threshold (default = 25) ensures entry only in deeply oversold conditions
• Enters Long when both conditions are true and no existing position is open.
Exit Logic
1. RSI Drop Exit:
If RSI continues to fall for a specified number of consecutive bars (dropPeriod, default = 3), the strategy closes the position.
2. Stop-Loss Exit:
Automatically closes when the open trade loses more than the specified percentage (stopLossPct, default = 15%).
Parameters
Parameter Default Description
RSI Period 14 Standard RSI length
RSI Entry Threshold 25 Open long only when RSI < this value
Pivot Lookback Left / Right 5 / 5 Determines swing points for divergence
Drop Period 3 Bars of continuous RSI decline before closing
Stop Loss % 15% Maximum allowed loss before exit
Use Case
• Works best in swing trading or reversal-catching environments.
• Combine with support/resistance or volume analysis for higher precision.
• Ideal for assets with mean-reversion tendencies (e.g. indices, large-cap stocks, crypto majors).
Visualization
• 🟢 Triangle Up: Bullish Divergence Detected
• 🟢 Dot / Marker: Entry signal (when RSI < threshold)
• ✖ Marker: Exit by RSI drop or Stop-loss
Strategy Notes
• Default setup trades only Long side.
• Can be extended easily to include Bearish Divergence Short entries (RSI > 75).
• Backtest on multiple timeframes (1H, 4H, 1D) for parameter optimization.
Concept:
This strategy combines classic RSI bullish divergence with a low RSI entry filter to catch early trend reversals in oversold zones.
It aims to identify high-probability turning points where price forms a lower low while RSI makes a higher low, indicating weakening downside momentum.
Entry Logic
• Bullish Divergence detected between price and RSI
→ Price makes a Lower Low, RSI makes a Higher Low
• RSI < Threshold (default = 25) ensures entry only in deeply oversold conditions
• Enters Long when both conditions are true and no existing position is open.
Exit Logic
1. RSI Drop Exit:
If RSI continues to fall for a specified number of consecutive bars (dropPeriod, default = 3), the strategy closes the position.
2. Stop-Loss Exit:
Automatically closes when the open trade loses more than the specified percentage (stopLossPct, default = 15%).
Parameters
Parameter Default Description
RSI Period 14 Standard RSI length
RSI Entry Threshold 25 Open long only when RSI < this value
Pivot Lookback Left / Right 5 / 5 Determines swing points for divergence
Drop Period 3 Bars of continuous RSI decline before closing
Stop Loss % 15% Maximum allowed loss before exit
Use Case
• Works best in swing trading or reversal-catching environments.
• Combine with support/resistance or volume analysis for higher precision.
• Ideal for assets with mean-reversion tendencies (e.g. indices, large-cap stocks, crypto majors).
Visualization
• 🟢 Triangle Up: Bullish Divergence Detected
• 🟢 Dot / Marker: Entry signal (when RSI < threshold)
• ✖ Marker: Exit by RSI drop or Stop-loss
Strategy Notes
• Default setup trades only Long side.
• Can be extended easily to include Bearish Divergence Short entries (RSI > 75).
• Backtest on multiple timeframes (1H, 4H, 1D) for parameter optimization.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.