Indicator · Pine Script v5 · On the chart

Meta Divergence

by zhuzp98· code credited to rhapsodyz

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.

View on GitHub

Repaints

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code424
Settings37inputs
LicenceNone stated
Last update1 year ago17 Jan 2025

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 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.

Details

Published by

zhuzp98 on GitHub

Code credit

rhapsodyz, as written in the script's header

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Divergence, Oscillators & momentum

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Pivot Periodint5prd
Source for Pivot PointsstringVWMAsource
Divergence TypestringRegularsearchdiv
Show Indicator NamesstringFullshowindis
Minimum Number of Divergenceint1showlimit
Maximum Pivot Points to Checkint10maxpp
Maximum Bars to Checkint100maxbars
Show Divergence Numberbooltrueshownum
Show Only Last Divergenceboolfalseshowlast
Don't Wait for Confirmationboolfalsedontconfirm
Show Divergence Linesbooltrueshowlines
Show Pivot Pointsboolfalseshowpivot
Show all 37 settings
SettingTypeDefaultVariable
MACDbooltruecalcmacd
MACD Histogrambooltruecalcmacda
RSIbooltruecalcrsi
Stochasticbooltruecalcstoc
CCIbooltruecalccci
Momentumbooltruecalcmom
OBVbooltruecalcobv
VWmacdbooltruecalcvwmacd
Chaikin Money Flowbooltruecalccmf
Money Flow Indexbooltruecalcmfi
Check External Indicatorboolfalsecalcext
External Indicatorsourcecloseexternalindi
Positive Regular Divergencecolorcolor.yellowpos_reg_div_col
Negative Regular Divergencecolorcolor.navyneg_reg_div_col
Positive Hidden Divergencecolorcolor.limepos_hid_div_col
Negative Hidden Divergencecolorcolor.redneg_hid_div_col
Positive Divergence Text Colorcolorcolor.blackpos_div_text_col
Negative Divergence Text Colorcolorcolor.whiteneg_div_text_col
Regular Divergence Line StylestringSolidreg_div_l_style_
Hdden Divergence Line StylestringDashedhid_div_l_style_
Regular Divergence Line Widthint2reg_div_l_width
Hidden Divergence Line Widthint1hid_div_l_width
Show MAs 50 & 200boolfalseshowmas
cma1colcolorcolor.limecma1col
cma2colcolorcolor.redcma2col
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.

Similar Pine Scripts

257 stars

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

Indicator v5 DivergenceOscillators & momentum Repaints
Updated 6 weeks ago · None stated GitHub repository of Snag - Best Futures V3

RSI Divergence Scanner

by TradersPost
218 stars

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

Indicator v6 Oscillators & momentumDivergence
Updated 3 months ago · None stated GitHub repository of RSI Divergence Scanner

Price Divergence

by capissimo
114 stars

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

Indicator v4 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Price Divergence

RSI Div at dVWAP StDev

by cryptorife
75 stars

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

Indicator v4 DivergenceOscillators & momentum Repaints
Updated 3 years ago · GPL-3.0 GitHub repository of RSI Div at dVWAP StDev

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

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of Adaptive Volatility-Adjusted Momentum Score

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers