Pine Library · 417 open-source scripts

Free Divergence Pine Scripts (page 4)

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

This indicator scans a pasted list of symbols for RSI directional momentum and shows matching long and short signals in a table in a separate pane. The user chooses continuous break, continuous retracement, flip break, flip retracement, divergence, or hidden d

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

Benso RSI + PMARP

by benso87
24 stars

This indicator plots an RSI and a PMARP line in a separate pane. It calculates RSI from a chosen source and length, then overlays an SMA or EMA signal. Horizontal bull and bear control and critical levels scale the oscillator. Optional arrows mark regular and

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

This indicator overlays multiple technical analysis tools onto the price chart to evaluate trend direction and trade setups. It computes an exponential moving average, a smoothed Stochastic RSI, a custom Williams Alligator using smoothed moving averages with o

Indicator v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Alligator + Stochastic

TQQQ MA+TSI

by yalili8521
2 stars

The TQQQ MA+TSI strategy executes trades based on triple simple moving average alignment combined with True Strength Index (TSI) divergence or momentum filters. Designed primarily for intraday stock trading, it evaluates price accumulation across fast, mid, an

Strategy v6 TrendOscillators & momentum
Updated 8 days ago · None stated GitHub repository of TQQQ MA+TSI

A/D Context v20.8

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane using Williams or Chaikin accumulation and distribution flow, a smoothing EMA, Chaikin Money Flow and ATR. It detects divergences between price and flow pivots and draws a line for the active divergence zone that fades on

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

RSI Divergence Detector

by knectardev
1 stars

The RSI Divergence Detector calculates Relative Strength Index (RSI) values and compares pivot highs and lows between price action and the RSI oscillator. It identifies four distinct divergence types: regular bullish, regular bearish, hidden bullish, and hidde

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

This strategy detects divergences in MACD, MACD histogram, and RSI indicators to generate buy and sell signals on the price chart. It supports long and short positions with customizable take-profit and stop-loss percentages. The main settings allow switching b

Strategy v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Divergence for Many [Dimkud]

RSI + CCI

by thanhnguyennguyen
33 stars

Calculates and plots both the Relative Strength Index (RSI) and the Commodity Channel Index (CCI) together inside a single separate pane. The indicator tracks maximum and minimum RSI values over a customizable lookback window to evaluate bullish and bearish mo

Indicator v4 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of RSI + CCI

Nexural QWAP

by JasonTeixeira
9 stars

Nexural QWAP calculates a volume-weighted average price combined with a cumulative volume delta order flow engine directly on the main price chart. It analyzes market structure by detecting volume absorption, liquidity sweeps, price-CVD divergence, stacked imb

Indicator v6 SMC / ICT / price actionVolume
Updated 13 days ago · Custom licence GitHub repository of Nexural QWAP
6 stars

This indicator detects regular and hidden divergences between price pivots and RSI or Williams %R. Confirmed swing highs and lows, which wait a set number of bars on each side, are compared with oscillator extremes. Regular divergences mark possible reversals,

Indicator v6 DivergenceOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of Capital41 Divergence Detector

This strategy executes long positions by combining a 200-period EMA trend filter, Stochastic RSI oversold crosses, and Williams Alligator retracements, supplemented by RSI divergence detection. It triggers long entries when the price trades above the 200 EMA w

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Alligator + Stochastic Long Strategy

Oscillator

by TamTH-Dev
2 stars

Oscillator plots a multi-component momentum indicator in a separate pane, combining WaveTrend, Money Flow Oscillator (MFO), and VWAP-based metrics. It tracks overbought and oversold market conditions using adjustable horizontal threshold levels. The script cal

Indicator v6 Oscillators & momentumDivergence
Updated 5 weeks ago · None stated GitHub repository of Oscillator
1 stars

A Pine v5 indicator in a separate pane that works from Williams or Chaikin accumulation and distribution flow, a smoothing EMA, Chaikin Money Flow and ATR. It finds divergences between price and flow pivots, detects the chart timeframe automatically with a man

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

RSI Elite Toolkit

by Focal-QuantAI
1 stars

An indicator in a separate pane built on a 21 period RSI with an optional higher-timeframe version, a selectable smoothing average, adjustable overbought, oversold and midline levels, and highlighted extreme zones. It detects regular and hidden divergences usi

Indicator v6 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of RSI Elite Toolkit

RSI Divergence Detector

by knectardev
1 stars

This indicator detects divergences between the RSI oscillator and price action. It calculates the RSI value using a user-defined length and identifies pivot highs and lows on both the price series and the RSI itself. The script plots bull divergences as potent

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

VuManChu B Divergences

by matlaenousse
1 stars

Calculates and plots a multi-oscillator panel inspired by Market Cipher B, combining a WaveTrend oscillator, fast WaveTrend line, Money Flow Index (MFI) area, and RSI. It automatically identifies regular and hidden bullish and bearish divergences, plotting sig

Indicator v4 Oscillators & momentumDivergence
Updated 10 months ago · None stated GitHub repository of VuManChu B Divergences

RSI Divergence Pro

by feliperazeek
1 stars

This strategy detects regular and hidden RSI divergences from pivot points on a 9-period RSI and trades them with labelled markers and stop lines on the price chart. Only long entries on bullish divergences are enabled by default, and shorts can be switched on

Strategy v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of RSI Divergence Pro
1 stars

Kurutoga Screener Timing Fix calculates price divergence from highest-high and lowest-low midpoints across three lookback horizons. By assessing divergence consistency across base, double, and quadruple lengths, it identifies synchronized momentum conditions.

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Kurutoga Screener Timing Fix
1 stars

This strategy looks for a simplified RSI divergence pattern. A long signal needs RSI two bars ago below the oversold level, RSI rising on the next bar and price lower; a short signal mirrors this at the overbought level. Each entry has an ATR-based stop loss a

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Divergence Strategy

RSI Divergence+

by krosenfeld7
1 stars

This indicator plots the Relative Strength Index (RSI) on the price chart with customizable overbought and oversold bands at 70 and 30. It detects divergences between price highs and lows versus RSI pivots using lookback periods and tolerance settings. The mai

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

MFI Divergences

by tistaharahap
25 stars

This indicator plots the Money Flow Index in a separate pane and marks regular and hidden bullish and bearish divergences between price pivots and the oscillator. It builds the index from positive and negative money flow, then finds pivot highs and lows using

Indicator v4 Oscillators & momentumVolume
Updated 6 years ago · None stated GitHub repository of MFI Divergences

MTF MA bands + RSI

by InNoobWeTrust
4 stars

This indicator plots multi-timeframe moving average bands alongside a Relative Strength Index in a separate pane. It calculates up to four configurable moving averages across different timeframes, offering selectable types such as SMA, EMA, and WMA with colore

Indicator v6 Oscillators & momentumMoving averages
Updated yesterday · None stated GitHub repository of MTF MA bands + RSI

KARPUZLU-RSI

by Kalumur
4 stars

Calculates a custom-period Relative Strength Index alongside an Exponential Moving Average of the RSI in a separate pane. It identifies pivot highs and lows directly on the RSI plot to highlight trendlines and potential divergence patterns. The area between th

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of KARPUZLU-RSI

TQQQ TSI Divergence

by yalili8521
2 stars

This strategy identifies hidden bullish and bearish divergences between price pivots and the True Strength Index (TSI) indicator. It incorporates an Exponential Moving Average (EMA) trend filter and a customizable trading session time window. Long positions en

Strategy v6 Oscillators & momentumDivergence
Updated 8 days ago · None stated GitHub repository of TQQQ TSI Divergence
2 stars

This strategy identifies price consolidation ranges during Asia session hours and trades mean-reversion reclaims following liquidity sweeps. It marks an initial range box, measures sweep depths past box boundaries using ATR multiples, and enters trades when pr

Strategy v6 Sessions & timeDivergence
Updated 4 weeks ago · Custom licence GitHub repository of MP Asia Range Sweep & Reclaim

Oscillator

by TamTH-Dev
2 stars

Oscillator combines WaveTrend calculations, Money Flow Oscillator (MFO), VWAP metrics, and fractal-based divergence detection into a single separate pane indicator. It plots overbought and oversold threshold levels, identifies trend momentum waves, and highlig

Indicator v6 Oscillators & momentumVolume
Updated 5 weeks ago · None stated GitHub repository of Oscillator
2 stars

This indicator detects trend changes and divergences using a Zigzag tool combined with an oscillator such as RSI or external sources. It plots zigzag lines on the price chart to mark potential trend reversals and identifies regular and hidden divergences. The

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MIT GitHub repository of Zigzag Trend/Divergence Detector

A/D Context v20.9

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane that measures accumulation and distribution flow with Williams or Chaikin A/D, a smoothing EMA, Chaikin Money Flow and ATR. It marks divergences between price and flow pivots and draws a line that closes with an end marke

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

RSI Divergence Detector

by knectardev
1 stars

This indicator calculates the RSI and detects regular and hidden divergences between price and RSI pivots. It plots the RSI on the price chart overlay and marks bullish regular, bearish regular, bullish hidden and bearish hidden divergences with labels. Horizo

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

RSI Divergences

by feliperazeek
1 stars

This indicator finds regular and hidden divergences between price and a 14-period RSI, together with a stochastic of the RSI, and draws divergence lines and labels on the price chart. A margin setting from zero to two controls how large a divergence it accepts

Indicator v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Divergences

An overlay indicator that marks reversal-style signals on the price chart: TD8 and TD9 counts, hammer, shooting star, bullish and bearish harami, and RSI divergence. Each signal can be switched on or off, and signals can be limited to long or short only. Marke

Indicator v5 Candlestick patternsDivergence
Updated 1 year ago · None stated GitHub repository of Price Action Signals and Filters

This strategy detects divergence strength across multiple indicators including RSI and MACD on the price chart. It evaluates regular and hidden divergences using user-defined weights for price and indicator changes along with lookback parameters for pivots and

Strategy v5 DivergenceOscillators & momentum
Updated 2 years ago · MPL-2.0 GitHub repository of Strength of Divergence Across Multiple Indicators on Tradingboat

OBV Divergences

by tistaharahap
25 stars

This indicator plots On Balance Volume in a separate pane and marks regular and hidden divergences between price pivots and the volume oscillator. It builds OBV from cumulative signed volume, finds pivot highs and lows with left and right lookbacks, and compar

Indicator v4 DivergenceVolume
Updated 6 years ago · None stated GitHub repository of OBV Divergences
24 stars

This overlay strategy combines a Cipher B WaveTrend oscillator with two optional moving averages on the price chart. It exposes WaveTrend channel and average lengths, overbought and oversold levels, buy, sell and gold dots, and regular or hidden divergence mar

Strategy v5 Oscillators & momentumMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Cipher B + EMAs Strategy

QFA Pro Elite Refined

by JasonTeixeira
9 stars

This indicator plots a smoothed fear index in a separate pane. It measures how far the current low sits below the highest close over a lookback, scales that reading by an ATR percentile, and smooths it with a zero-lag EMA. A volatility regime raises or lowers

Indicator v6 Oscillators & momentumVolatility & bands
Updated 13 days ago · Custom licence GitHub repository of QFA Pro Elite Refined

RSI Divergence

by muammeryldrm42
7 stars

This strategy detects bullish and bearish RSI divergences using price and RSI pivot points. A bullish divergence triggers a long entry when price forms a lower low while RSI forms a higher low below 40. A bearish divergence triggers a short entry when price fo

Strategy v5 Oscillators & momentumDivergence
Updated 3 months ago · MIT GitHub repository of RSI Divergence

This indicator combines RSI and MFI into a hybrid oscillator scaled to 0-1. It detects divergences by comparing price and MFI slopes from linear regression. The MFI receives extra weight during divergence to amplify the effect. A TMA smooths the hybrid result

Indicator v6 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of Hybrid RSI+MFI - Gold Divergence

Oscillator

by TamTH-Dev
2 stars

This indicator plots a composite oscillator in a separate pane, integrating squeeze momentum, directional flux, divergence detection, and confluence gauges. It calculates momentum dynamics and squeeze conditions, highlights regular or hidden divergences with l

Indicator v6 Oscillators & momentumDivergence Repaints
Updated 5 weeks ago · None stated GitHub repository of Oscillator
1 stars

Overlays higher-timeframe context on the price chart, using lower-timeframe data to find volume spikes inside each higher-timeframe bar. It combines RSI pivot divergence with a volume conviction check, and can show a ghost of the previous bar, stacked imbalanc

Indicator v6 VolumeDivergence Repaints Archived
Updated 5 months ago · None stated GitHub repository of HTF Volume Spike, Divergence & Conviction

Double MACD

by AlanGuo
1 stars

A strategy that plots two MACD histograms in a separate pane, a slower trending pair (89 and 144) and a faster energy pair (13 and 21). Backtesting is switched on by a setting, with a long or short direction and a mode choice between trend following and diverg

Strategy v6 Oscillators & momentumDivergence Repaints
Updated 7 months ago · None stated GitHub repository of Double MACD
1 stars

This strategy looks for mean-reversion entries when RSI crosses back through the oversold or overbought levels, or recovers from more extreme RSI readings. Optional divergence confirmation can require a price and RSI mismatch before entry. It opens one long or

Strategy v5 Mean reversionOscillators & momentum
Updated 7 months ago · None stated GitHub repository of RSI Extremes - Mean Reversion

SMT Divergence

by Ahmed1926
1 stars

An indicator in a separate pane that looks for smart money technique divergence between the chart symbol and a second symbol, which defaults to gold. It finds fractal pivot highs and lows on both, compares the latest two on each, and flags a bullish or bearish

Indicator v5 DivergenceSMC / ICT / price action
Updated 9 months ago · None stated GitHub repository of SMT Divergence

RSI Price Action

by feliperazeek
1 stars

This indicator calculates a 14-period RSI and marks overbought and oversold conditions directly on the price chart, using labels on candles, shaded background zones and an optional RSI line. It can show the current RSI value, print RSI values at set bar interv

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of RSI Price Action

Stochastic Divergence+

by krosenfeld7
1 stars

This indicator calculates the Stochastic oscillator (%K and %D) and scans for divergences between price swings and oscillator swings. It detects pivot highs and lows on both price and the stochastic lines using user-defined lookback intervals and tolerance thr

Indicator v4 DivergenceOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Stochastic 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