Pine Library · 417 open-source scripts

Free Divergence Pine Scripts (page 3)

Open-source Pine scripts that find divergence between price and an oscillator such as RSI or MACD, regular and hidden.

Pine scripts417
Code shown here223open licence
Updated in a year292
No repaint flag364

Divergence: Indicators, Strategies and Libraries

Bandz Po3 Profiler

by samuelharting
18 stars

Bandz Po3 Profiler draws an ICT-style power-of-three profile on the price chart. It plots higher-timeframe candles, C1 through C4 sequence boxes, T-Spot zones, CISD marks, fair value gaps, STDV projections, sweeps, midpoints, opens, and liquidity. It also mark

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Po3 Profiler

Relative Strength Index

by deepentropy
13 stars

The Relative Strength Index indicator calculates momentum based on price changes over a specified length and plots the curve in a separate pane. It includes adjustable upper and lower bands, background color fills, and an optional smoothing moving average or B

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index

Chaikin Oscillator - Eterna MCP

by EternaHybridExchange
9 stars

This strategy calculates the Chaikin Oscillator by taking the difference between fast and slow exponential moving averages of the Accumulation/Distribution line. It generates long and short entries when the oscillator crosses the signal threshold with directio

Strategy v5 Oscillators & momentumVolume
Updated 7 months ago · MIT GitHub repository of Chaikin Oscillator - Eterna MCP
4 stars

Divergences (Brahim) identifies regular and hidden divergences between price pivots and up to ten technical indicators, including RSI, MACD, Stochastic, CCI, and OBV, along with an optional external source. Plotted directly on the price chart, it renders conne

Indicator v4 DivergenceOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Divergences (Brahim)

Market Cipher B

by TamTH-Dev
2 stars

Market Cipher B is a multi-oscillator indicator that draws in a separate pane. It plots a Wave Trend line from a channel period, an average period, a moving-average source, and a moving-average length, with optional divergence markers at long and short bullish

Indicator v6 Oscillators & momentumDivergence
Updated 5 weeks ago · None stated GitHub repository of Market Cipher B

Directional EMA For Loop

by vedkanani123
1 stars

A separate-pane oscillator that smooths price with a selectable moving average, then scores its direction by looping over a range of lookbacks from a start to an end value. The score is compared with long and short thresholds to mark uptrend and downtrend stat

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of Directional EMA For Loop

A/D Context v20.10

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane that follows accumulation and distribution flow, using Williams or Chaikin A/D together with a smoothing EMA, Chaikin Money Flow and ATR. It looks for divergences between price pivots and flow pivots, with regular, hidden

Indicator v5 DivergenceVolume
Updated 3 months ago · None stated GitHub repository of A/D Context v20.10

A chart-overlay SuperTrend variant whose ATR multiplier shrinks for a limited number of bars after a divergence is found. Divergences are detected with pivots between price and a hidden oscillator, and shown as small markers. If a divergence in the trend direc

Indicator v6 TrendDivergence
Updated 9 months ago · None stated GitHub repository of SuperTrend Weighted by Divergence

SFA Price Gap Inefficiency v1

by genesisgrubio39
1 stars

The library detects price gap inefficiencies using structural flow analytics. It identifies new bullish and bearish gaps with their top and bottom levels, tracks mitigation status, and checks flow alignment between price and CVD trends. It applies regime detec

Library v6 SMC / ICT / price actionVolume
Updated 10 months ago · None stated GitHub repository of SFA Price Gap Inefficiency v1

Calculates standard Relative Strength Index values and identifies positive bullish divergences between price swing lows and RSI lows. The script tracks confirmed pivots using configurable left and right lookback lengths, storing historical pivot prices and ind

Indicator v5 DivergenceOscillators & momentum
Updated 1 year ago · GPL-3.0 GitHub repository of Positive RSI Divergence Detector

Volume Price Indicator

by fuyuanyuan
1 stars

This indicator plots colored volume bars on the price chart, where green shows price up days and red shows price down days. It also draws an EMA of volume in yellow. The script detects bullish and bearish divergences by comparing price highs/lows to volume hig

Indicator v6 VolumeMoving averages
Updated 1 year ago · None stated GitHub repository of Volume Price Indicator

This indicator calculates the Directional Movement Index, including plus DI, minus DI, and a smoothed ADX, then compares confirmed ADX pivots with price pivots to mark divergences. Users set price and ADX lookbacks, a short, medium, or long divergence range, a

Indicator v4 Oscillators & momentumDivergence
Updated 3 years ago · Apache-2.0 GitHub repository of Directional Movement Index Divergence+

CCI Low/High Divergences

by tistaharahap
25 stars

This indicator plots two Commodity Channel Index lines in a separate pane: one from candle lows and one from closes. It marks regular bullish divergences when price makes a lower low while the low-based CCI makes a higher low, and regular bearish divergences f

Indicator v4 Oscillators & momentumDivergence
Updated 6 years ago · None stated GitHub repository of CCI Low/High Divergences
16 stars

This indicator plots RSI in a separate pane and compares oscillator pivots with price to mark regular bullish and bearish divergences. Left and right pivot lookbacks and a minimum-to-maximum bar range control which swings qualify. Regular divergence labels are

Indicator v5 Oscillators & momentumDivergence
Updated 2 years ago · None stated GitHub repository of Divergence Indicator + MACD

Relative Strength Index

by deepentropy
13 stars

This indicator plots the Relative Strength Index in a separate pane from smoothed up and down price changes. It draws the RSI line with horizontal bands at 70, 50 and 30, plus overbought and oversold gradient fills. Optional settings add a smoothing moving ave

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index
11 stars

The Stochastic Divergence Strategy calculates the Stochastic oscillator (%K and %D) to identify regular bullish and bearish divergence patterns against price pivots. It plots the oscillator and divergence lines in a separate indicator pane. Entries trigger on

Strategy v6 Oscillators & momentumDivergence
Updated 5 months ago · Apache-2.0 GitHub repository of Stochastic Divergence Strategy
4 stars

This indicator detects regular and hidden divergences across multiple technical oscillators, including MACD, RSI, Stochastic, CCI, Momentum, OBV, CMF, and MFI. Plotted directly on the price chart, it draws divergence connecting lines and visual labels when a m

Indicator v4 DivergenceOscillators & momentum
Updated 4 years ago · None stated GitHub repository of RSI/Stoch/BB/Divs (Brahim)
3 stars

Calculates a Relative Strength Index oscillator and detects regular and hidden bullish or bearish divergences using pivot points. It displays in a separate pane below the main chart, highlighting divergence occurrences between price movement and the RSI oscill

Indicator v5 Oscillators & momentumDivergence Repaints
Updated 1 year ago · None stated GitHub repository of Sapphire RSI Divergence Indicator

Reverse RSI Signals [AlgoAlpha]

by mushroom-men-Trading
2 stars

This indicator projects reverse RSI price levels directly onto the main price chart to generate dynamic upper and lower bands alongside a Supertrend envelope midline. It detects bullish and bearish divergences by tracking RSI pivots with a configurable left lo

Indicator v6 Oscillators & momentumTrend
Updated 9 months ago · None stated GitHub repository of Reverse RSI Signals [AlgoAlpha]
1 stars

Compares a smoothed FX price trend with a smoothed government yield spread trend, z-scores both over a normalisation window and plots them in a separate pane along with their difference. Threshold bands mark when the two are aligned and when they diverge, usin

Indicator v6 Oscillators & momentumDivergence
Updated yesterday · None stated GitHub repository of FX Price vs Yield Spread

Order Flow Delta

by mrme000m
1 stars

A Pine v5 indicator in a separate pane that estimates buying and selling pressure from each candle's position between its low and high, weighted by volume. It plots the per-bar delta, a moving average of delta, cumulative delta and buy and sell percentages. Ex

Indicator v5 VolumeDivergence
Updated 7 weeks ago · None stated GitHub repository of Order Flow Delta

A/D Context v20.10

by VVASILEVSS
1 stars

A Pine v5 indicator that draws in its own pane and measures accumulation and distribution flow with Williams or Chaikin A/D, a smoothing EMA, Chaikin Money Flow and ATR. It compares price pivots with flow pivots to flag regular or hidden divergences, optionall

Indicator v5 DivergenceVolume
Updated 3 months ago · None stated GitHub repository of A/D Context v20.10

Fusion Cipher Strategy

by shahzaib-574
1 stars

Fusion Cipher Strategy is an overlay strategy that scores wave momentum, money flow, VWAP, RSI, Stochastic RSI, ADX, and divergence conditions before opening trades. It enters long when the composite score meets a minimum and the wave is below a pullback thres

Strategy v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Fusion Cipher Strategy

Relative Strength Index

by yagyesh-bobde
1 stars

Calculates and plots the Relative Strength Index (RSI) oscillator in a separate pane with overbought and oversold visual fills. It includes an optional smoothing moving average supporting SMA, EMA, SMMA, WMA, VWMA, or SMA with Bollinger Bands. Additionally, it

Indicator v6 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Relative Strength Index

Trading Latino

by micayael
1 stars

A separate-pane indicator, short title LVA, that pairs a squeeze momentum histogram with an ADX-style line. Cross markers on the zero line show whether Bollinger Bands are inside Keltner Channels. It adds an optional higher-timeframe status monitor with an adj

Indicator v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of Trading Latino

This indicator calculates momentum setups based on the Relative Strength Index (RSI) and plots in a separate pane. It offers multiple scanning modes such as Continuous Break, Continuous Retracement, Flip Break, Flip Retracement, and both regular and hidden div

Indicator v6 Oscillators & momentumDivergence Repaints
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - RSI Directional Momentum Indicator

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

WaveTrend 3D

by nersent
29 stars

WaveTrend 3D is a redesigned oscillator that implements the classic WaveTrend algorithm with kernel-based regression for trend reversal confirmation and multi-timeframe support. It calculates a smoothed oscillator line and displays a symmetrical three-dimensio

Indicator v5 Oscillators & momentumDivergence
Updated 11 months ago · Custom licence GitHub repository of WaveTrend 3D

Benso RSI

by benso87
24 stars

This indicator calculates a Relative Strength Index using Wilder or Cutler calculation methods, accompanied by an optional smoothing moving average and a signal line. Plotted in a separate pane, it features defined bull and bear control and critical threshold

Indicator v5 Oscillators & momentumDivergence
Updated 4 years ago · MPL-2.0 GitHub repository of Benso RSI
3 stars

The Divergence Screener by Trendoscope identifies regular and hidden bullish and bearish divergences between price action and technical oscillators in a separate pane. It supports multiple oscillators including RSI, CCI, CMO, and COG, as well as custom externa

Indicator v6 DivergenceOscillators & momentum Repaints
Updated 12 months ago · None stated GitHub repository of Divergence Screener [Trendoscope]
3 stars

This price-chart strategy is built around RSI divergence using a configurable RSI length and source plus left and right pivot lookbacks. Separate toggles control regular and hidden bullish and bearish divergence plots, and an RSI level is available as a take-p

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Sapphire RSI Divergence Strategy
2 stars

Calculates the divergence between global money supply growth and benchmark equity performance to highlight potential market turning points. It aggregates M2 money supply metrics across major economies—including the US, China, Eurozone, Japan, UK, Canada, and S

Indicator v6 DivergenceScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Central Bank Liquidity Gap Indicator

Divergence Engine

by jayadevrana
1 stars

This indicator plots an RSI oscillator in a separate pane with fixed overbought and oversold lines. It stores confirmed RSI pivot highs and lows, then compares each new pivot with the previous one inside a bar-gap window. A lower price low with a higher RSI lo

Indicator v6 Oscillators & momentumDivergence
Updated 3 days ago · MPL-2.0 GitHub repository of Divergence Engine

DMS v2 Breadth Dispersion

by AssetWhisper
1 stars

An indicator in a separate pane that compares a cap-weighted index with its equal-weighted counterpart, SPY and RSP by default, to gauge market breadth. It takes the log ratio of the two, then adds its momentum, a z-score, a percentile rank, divergences agains

Indicator v5 DivergenceScreeners & dashboards
Updated 7 weeks ago · MPL-2.0 GitHub repository of DMS v2 Breadth Dispersion

A/D Context v20.7

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane built on Williams or Chaikin accumulation and distribution flow, a smoothing EMA, Chaikin Money Flow and ATR. It detects divergences between price and flow pivots, with cooldown bars and optional confirmation after the di

Indicator v5 DivergenceVolume
Updated 3 months ago · None stated GitHub repository of A/D Context v20.7

Fusion Cipher Toolkit

by shahzaib-574
1 stars

This indicator combines several oscillators in a separate pane: a wave momentum line with signal, a money flow area with selectable models, a VWAP-based oscillator, RSI and Stochastic RSI. It marks dots where several conditions agree, with a minimum confluence

Indicator v6 Oscillators & momentumDivergence
Updated 3 months ago · None stated GitHub repository of Fusion Cipher Toolkit

GEKO Ultimate - UO Williams Baseline

by grzegorzkowalskigk-jpg
1 stars

This strategy applies Larry Williams' Ultimate Oscillator rules, blending 7, 14 and 28 period buying pressure, and draws in a separate pane. A long entry needs the oscillator below 30, a bullish price divergence and a break above the oscillator peak from that

Strategy v6 Oscillators & momentumDivergence
Updated 3 months ago · Custom licence GitHub repository of GEKO Ultimate - UO Williams Baseline

An indicator for the price chart, written with gold on a three-minute chart in mind, that looks for long and short setups. It detects regular or hidden divergences on RSI, MACD, MACD histogram, stochastic and optionally CCI, momentum and MFI, and needs a minim

Indicator v6 DivergenceOscillators & momentum
Updated 6 months ago · None stated GitHub repository of Gold Strategy - Divergence + ATR + RSI
1 stars

MACD Divergence - Reversal Hunter detects regular and hidden divergences between price action and the MACD line using pivot points. It generates buy signals on bullish divergences and sell signals on bearish divergences, with optional RSI filter for overbought

Strategy v5 DivergenceOscillators & momentum
Updated 7 months ago · None stated GitHub repository of MACD Divergence - Reversal Hunter
1 stars

A separate-pane indicator that studies how volume behaves around potential reversals. It measures volume relative to its average and its short-term trend, a delta volume proxy from candle colour, rate-of-change velocity and deceleration, and volume-price diver

Indicator v5 VolumeDivergence
Updated 8 months ago · MIT GitHub repository of Volume-Price Reversal Filter

RSI Divergence Detector

by knectardev
1 stars

This indicator calculates the Relative Strength Index (RSI) and detects regular and hidden bullish and bearish divergences between price movement and RSI values. It identifies pivot highs and pivot lows across both price action and the RSI oscillator using a c

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

量价指标

by fuyuanyuan
1 stars

This indicator combines volume-price divergence detection, RSI-filtered volume breakouts, and MACD divergence signals on the price chart. It evaluates price extremes relative to volume levels to detect volume-price divergences with arrow shapes. It also identi

Indicator v6 VolumeOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 量价指标

MACD Divergence+

by krosenfeld7
1 stars

MACD Divergence+ calculates standard MACD and signal lines to identify divergence conditions between price action and momentum oscillator pivots. It detects pivot highs and pivot lows across customizable lookback periods, allowing users to configure divergence

Indicator v4 Oscillators & momentumDivergence
Updated 3 years ago · Apache-2.0 GitHub repository of MACD Divergence+

More Pine Script Categories

Browse the whole Pine Library

Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers