An indicator that looks for regular or hidden divergences between price pivots and up to eleven oscillators and volume tools, including MACD, RSI, Stochastic, CCI, momentum, OBV, Chaikin Money Flow and MFI.
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
Meta Divergence draws divergence lines and labels on the price chart, with an optional count of how many indicators agree. Pivot period, pivot source, minimum agreeing indicators and the lookback are adjustable. Signals depend on confirmed pivots unless confirmation is switched off, which can make them appear late or change.
Regular and hidden divergence detection
Checks ten built-in indicators plus an external one
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Pivot Period
int
5
prd
Source for Pivot Points
string
VWMA
source
Divergence Type
string
Regular
searchdiv
Show Indicator Names
string
Full
showindis
Minimum Number of Divergence
int
1
showlimit
Maximum Pivot Points to Check
int
10
maxpp
Maximum Bars to Check
int
100
maxbars
Show Divergence Number
bool
true
shownum
Show Only Last Divergence
bool
false
showlast
Don't Wait for Confirmation
bool
false
dontconfirm
Show Divergence Lines
bool
true
showlines
Show Pivot Points
bool
false
showpivot
Show all 37 settings
Setting
Type
Default
Variable
MACD
bool
true
calcmacd
MACD Histogram
bool
true
calcmacda
RSI
bool
true
calcrsi
Stochastic
bool
true
calcstoc
CCI
bool
true
calccci
Momentum
bool
true
calcmom
OBV
bool
true
calcobv
VWmacd
bool
true
calcvwmacd
Chaikin Money Flow
bool
true
calccmf
Money Flow Index
bool
true
calcmfi
Check External Indicator
bool
false
calcext
External Indicator
source
close
externalindi
Positive Regular Divergence
color
color.yellow
pos_reg_div_col
Negative Regular Divergence
color
color.navy
neg_reg_div_col
Positive Hidden Divergence
color
color.lime
pos_hid_div_col
Negative Hidden Divergence
color
color.red
neg_hid_div_col
Positive Divergence Text Color
color
color.black
pos_div_text_col
Negative Divergence Text Color
color
color.white
neg_div_text_col
Regular Divergence Line Style
string
Solid
reg_div_l_style_
Hdden Divergence Line Style
string
Dashed
hid_div_l_style_
Regular Divergence Line Width
int
2
reg_div_l_width
Hidden Divergence Line Width
int
1
hid_div_l_width
Show MAs 50 & 200
bool
false
showmas
cma1col
color
color.lime
cma1col
cma2col
color
color.red
cma2col
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 multiple tickers simultaneously to detect regular bullish and bearish MACD divergences filtered by long-term trend direction (150 EMA versus 600 EMA). It evaluates pivot highs and lows in the MACD line against price action across configura
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
The RSI Divergence Scanner calculates the Relative Strength Index and identifies regular and hidden bullish or bearish divergences against price using pivot high and low points. It plots divergence lines and customizable labels directly on the price chart. Inp
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