This indicator identifies regular and hidden divergences across up to ten technical oscillators simultaneously, including RSI, MACD, Stochastic, CCI, Momentum, OBV, VW-MACD, CMF, MFI, and an external source.
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
Divergence for Many Indicators yzz plots divergence lines and text labels directly on the price chart based on pivot highs and lows. Settings allow filtering by divergence counts, adjusting pivot search parameters, toggling individual indicators, and displaying optional 50 and 200 moving averages across custom timeframes.
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
Close
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 40 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
Price Source For The Moving Averages
source
close
pricetype
Use Current Timeframe As Resolution?
bool
true
useCurrentRes
Use Different Timeframe? Then Uncheck The Box Above
timeframe
W
resCustom
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 collection calculates and plots previous daily high and low price levels on the chart to identify potential supply and demand zones. It includes real-time intraday high and low calculations, RSI divergence detection across a customizable period
This indicator combines Fibonacci Golden Zone retracements, VWAP-based divergence detection, and RSI optimized with Kernel Density Estimation (KDE). It identifies high and low swing points to overlay key Fibonacci retracement levels directly on the main price
This indicator calculates pivot high and pivot low points on the price chart based on configurable left and right bar counts. Confirmed pivot highs and lows are plotted with negative bar offsets directly on the price chart using line and cross styles. Addition
This overlay indicator marks call and put setups from EMAs, RSI, MACD, and a SPY volume ratio. A call needs higher highs, RSI above its minimum, rising MACD, above-average proxy volume, and a rising trend EMA; a put reverses those tests. Early markers use an E
This overlay indicator marks CALLS and PUTS labels on the price chart when a strict boolean gate of price structure, momentum, volatility, breadth, and candle confirmation all pass. It plots an EMA ribbon with cloud fill, session-anchored VWAP and standard-dev
This script provides an indicator-based backtesting engine framework that simulates trade entries, exits, and filtering directly on the price chart. It evaluates selected entry rules and multi-layered filters, including moving average trends, volume increases,