1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.
Overview
RSI Divergence Indicator MP v3 features an early signal mode that uses a shorter lookback to detect provisional divergence earlier, tracking whether early pivots hold or fail over time. A built-in statistics table displays the early signal hit rate. Users can adjust RSI periods, pivot lookbacks, early lookback sensitivity, RSI zone thresholds, and toggle divergence trendlines on the main chart pane.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
RSI Period
int
14
len
RSI Source
source
close
src
Pivot Lookback Right
int
5
lbR
Pivot Lookback Left
int
5
lbL
Max of Lookback Range
int
60
rangeUpper
Min of Lookback Range
int
5
rangeLower
Use true swing extreme for price
bool
false
usePriceExtreme
Show early divergence signals
bool
true
earlyOn
Early pivot lookback right
int
2
fastRIn
Mark outcome (✓ held / ✕ failed)
bool
true
showOutcome
Show early-signal hit-rate table
bool
true
showStats
Confirm on bar close
bool
true
confirmOnClose
Show all 21 settings
Setting
Type
Default
Variable
Require RSI pivot inside zone (regular div only)
bool
false
useZone
Bull: RSI pivot at or below
float
40
bullZone
Bear: RSI pivot at or above
float
60
bearZone
Min RSI difference between pivots
float
0
minOscDelta
Plot Bullish
bool
true
plotBull
Plot Hidden Bullish
bool
false
plotHiddenBull
Plot Bearish
bool
true
plotBear
Plot Hidden Bearish
bool
false
plotHiddenBear
Draw divergence lines on price chart
bool
false
showPriceLines
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator scans a pasted list of symbols for RSI directional momentum and shows matching long and short signals in a table in a separate pane. The user chooses continuous break, continuous retracement, flip break, flip retracement, divergence, or hidden d
This indicator calculates the Relative Strength Index (RSI) across four user-selected timeframes and plots the results in a separate pane. It identifies regular bullish and bearish divergences between price pivot points and the primary timeframe RSI value. Add
Oscillator Suite plots a normalised price oscillator in a separate pane and overlays a signal line that can use SMA, EMA, WMA, HMA, RMA, VWMA, T3, ZEMA, KAMA, or GKEMA. It marks bullish and bearish divergences, a smoothed money-flow series, confluence areas an
This indicator plots a smoothed Z-score of cumulative volume delta in a separate pane, showing whether buying or selling pressure is dominant and when the reading enters extreme zones. It marks spot accumulation, climax or exhaustion, and pivot-based price-vol
This indicator plots a heuristic volume-balance oscillator in a separate pane. It estimates signed volume from the close location inside each bar, multiplies that by volume, and sums the proxy over a rolling window. The sum is scaled between minus one and plus
Calculates a custom-period Relative Strength Index alongside an Exponential Moving Average of the RSI in a separate pane. It identifies pivot highs and lows directly on the RSI plot to highlight trendlines and potential divergence patterns. The area between th