This indicator identifies regular and hidden bullish and bearish divergences between price action and multiple technical indicators, including RSI, OBV, MACD, Stochastic, and CCI.
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
Strength of Divergence Across Multiple Indicators evaluates price and indicator pivots over a configurable lookback window, calculating a composite strength score based on user-defined indicator weights and price versus indicator magnitude. Confirmed divergences and trendlines are drawn directly on the main price chart. Key settings allow customization of pivot detection lengths, lookback limits, trendline break filtering, and individual indicator weights. Signal labels appear retroactively upon pivot confirmation.
Multi-indicator divergence detection for RSI, OBV, MACD, Stoch, and CCI
Composite weighted strength scoring for regular and hidden divergences
Configurable pivot parameters and lookback range
Trendline break validation to filter out invalidated divergences
On-chart visualization with divergence trendlines and strength labels
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Bullish
bool
true
bullSwitch
Bearish
bool
true
bearSwitch
Hidden
bool
true
showHidden
Exclude if broken trendline
bool
true
noBroken
Previous pivot bars before/after
int
4
ppLength
Next (divergent) pivot bars before
int
4
cpLengthBefore
Next (divergent) pivot bars after
int
2
cpLengthAfter
Lookback bars
int
50
lbBars
Lookback pivots
int
2
lbPivs
Regular divergence weight
float
1.0
w_reg
Hidden divergence weight
float
1.0
w_hid
Δ price weight
float
0.5
w_p
Show all 40 settings
Setting
Type
Default
Variable
Δ indicator weight
float
1.5
w_i
Bullish divergence price source
source
low
bullPsource
Bearish divergence price source
source
high
bearPsource
RSI
bool
true
iRsi
Weight
float
1.1
w_rsi
Extreme value
float
1.0
e_rsi
OBV
bool
true
iObv
Weight
float
0.8
w_obv
Extreme value
float
1.0
e_obv
MACD
bool
true
iMacd
Weight
float
.9
w_macd
Extreme value
float
1.0
e_macd
STOCH
bool
true
iStoch
Weight
float
0.9
w_stoch
Extreme value
float
1.0
e_stoch
CCI
bool
true
iCci
Weight
float
1.0
w_cci
Extreme value
float
1.0
e_cci
MFI
bool
true
iMfi
Weight
float
1.0
w_mfi
Extreme value
float
1.0
e_mfi
AO
bool
true
iAo
Weight
float
1.0
w_ao
Extreme value
float
1.0
e_ao
Alert
bool
true
a_on
for values above
float
5.0
a_above
Show lines
bool
true
noLine
Show labels
bool
true
noLab
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 overlay indicator looks for regular price divergences against a set of oscillators, using pivot highs and lows. It compares those pivots with RSI, MACD and its histogram, stochastic, CCI, momentum, OBV, a directional oscillator, volume-weighted MACD, Chai
This indicator detects regular and hidden divergences across multiple technical factors plotted directly on the price chart. It evaluates price highs and lows against peaks and troughs identified by a five-bar fractal mechanism on RSI, RSI Stochastic, MACD, re
This indicator marks RSI divergences only when price trades beyond daily VWAP standard-deviation bands. It compares recent RSI extremes with price highs and lows over a lookback window, and it treats a divergence as valid only while RSI stays beyond overbought
This indicator builds a momentum score from the rate of change of close, using a lookback that expands or contracts with ATR relative to its standard deviation. It divides that rate of change by price standard deviation, scales the result, and weights it by vo
Oscillator Workbench — Chart plots a configurable blend of two built-in oscillators and an optional external oscillator on the price chart. It draws a weighted oscillator line and a reference moving average, coloring both by successive up or down states. Users
This indicator merges multiple momentum oscillators including MACD, RSI, Stochastic, CCI, Momentum, OBV, VW MACD, Chaikin Money Flow and Money Flow Index into one chart. It scans for regular and hidden divergences between the chosen indicators to signal potent