Pine Library · 417 open-source scripts

Free Divergence Pine Scripts (page 8)

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

An indicator component that computes a slow stochastic oscillator with 14, 3 and 3 settings and checks it for regular bullish and bearish divergence against price pivots. The stochastic plot and the divergence labels are commented out in the visible code, so l

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 24 Stochastic

CVD Momentum Divergence

by eddiebelaval
7 stars

This indicator approximates cumulative volume delta from each bar's volume and candle body, then detrends and normalizes both price and CVD so they can be compared in a separate pane. It plots the two smoothed series and an optional histogram of their differen

Indicator v6 Oscillators & momentumVolume
Updated 3 months ago · None stated GitHub repository of CVD Momentum Divergence
1 stars

This indicator calculates regular and hidden divergences across multiple momentum and volume oscillators, including MACD, RSI, Stochastic, CCI, Momentum, OBV, VW-MACD, CMF, and MFI, as well as an optional external input. It scans for pivot highs and lows using

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Combined Indicators Fixed

This indicator evaluates how price relates to one selected moving-average family rather than treating a crossover as a signal. It scores trend quality, historical respect of the average, extension, compression, acceleration, and exhaustion, then plots a relati

Indicator v6 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of Market–Average Relationship Engine [WavesUnchained]

This overlay strategy enters long when regular or hidden bullish RSI divergence forms between price lows and RSI pivot lows. A regular signal needs a lower price low with a higher RSI low, and a hidden signal needs a higher price low with a lower RSI low, both

Strategy v4 Oscillators & momentumDivergence
Updated 3 years ago · Apache-2.0 GitHub repository of RSI Divergence Long Strategy (Not Good)
1 stars

This indicator scans multiple technical indicators—including MACD, RSI, Stochastic, CCI, Momentum, OBV, VWMA, CMF, and MFI—to detect regular and hidden divergences against price pivot points. It overlays divergence lines and labels directly on the price chart

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Divergence for Many Indicators yzz
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts (SMC) trading strategies. It detects market structure shifts (MSS), breaks of structure (BOS), M5 Fair Value Gaps (FVG), Order Blocks (OB), and Asian session ranges.

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine
3 stars

Calculates buy and sell volume pressure alongside the Awesome Oscillator to scan for market divergence opportunities. It initiates long and short strategy entries when divergence signals meet conditions, optionally filtered by New York trading session hours an

Strategy v5 DivergenceVolume
Updated 5 months ago · None stated GitHub repository of Divergence Scanner
1 stars

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. It plots divergence lines and text labels directly o

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Divergence for Many Indicators yzz

RSI Divergence Scanner

by TradersPost
228 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

VuManChu B Divergences

by GreyssonEnterprises
1 stars

This indicator plots a WaveTrend oscillator in a separate pane, modeled after Market Cipher B. It marks wave crossings with small circles, green buy dots when waves cross up at oversold levels, and red sell dots when they cross down at overbought levels. Gold

Indicator v4 Oscillators & momentumDivergence
Updated 2 months ago · MIT GitHub repository of VuManChu B Divergences

RSI Divergence Template

by TradersPost
228 stars

This indicator plots the Relative Strength Index in a separate pane and marks regular and hidden bullish and bearish divergences. It compares confirmed price pivots with RSI pivots within a lookback window: regular divergence contrasts a price extreme with the

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

A separate-pane indicator that builds On Balance Volume and subtracts its 20-period EMA to form an oscillator, drawn as a coloured line and area around a zero line. It detects regular bullish and bearish divergence between price pivots and the oscillator, labe

Indicator v5 VolumeDivergence
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 41 OBV
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

Bubbles Indicator

by capissimo
114 stars

The Bubbles Indicator measures volatility squeezes and expansion bursts using Bollinger Bands combined with a sinusoid oscillator and RSI divergence. It processes price data through scaled Bollinger Bands to highlight volatility changes while confirming trend

Indicator v4 Volatility & bandsOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Bubbles Indicator

Oscillator Suite

by TamaraKGreen
46 stars

Oscillator Suite plots a normalised price oscillator in a separate pane and overlays a signal line that can use SMA, EMA, WMA, HMA, RMA, VWMA, T3, ZEMA, KAMA, or GKEMA. It marks bullish and bearish divergences, a smoothed money-flow series, confluence areas an

Indicator v5 Oscillators & momentumDivergence
Updated 7 weeks ago · None stated GitHub repository of Oscillator Suite
1 stars

This indicator calculates the Relative Strength Index and identifies regular and hidden divergences between oscillator pivots and price pivots. It plots the RSI oscillator with overbought and oversold reference levels in a separate pane. When divergences occur

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

GCM Volume-Price Essence

by eddiebelaval
7 stars

GCM Volume-Price Essence is a separate-pane oscillator that weights recent price change by a short-to-longer volume ratio and a volume impact factor. It plots the smoothed difference of fast and slow exponential flows, plus optional quantum base line, dynamic

Indicator v6 Oscillators & momentumVolume
Updated 3 months ago · None stated GitHub repository of GCM Volume-Price Essence

SMI Hist Divergence

by zhuzp98
1 stars

An oscillator in a separate pane based on the Stochastic Momentum Index. It plots the SMI, an EMA of it, and a histogram of how the gap between the two changes from bar to bar, coloured by direction and strength. Dashed bands sit at plus and minus 40 with grad

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of SMI Hist Divergence

Convergence Spirals

by morindok
1 stars

This indicator plots convergence spirals on the price chart using two user-defined points defined by time and price. It calculates spiral paths with options for symmetric spirals, extension, and mirroring of selected levels or endpoints. Inputs control divisor

Indicator v5 Support & resistanceDivergence
Updated 7 weeks ago · None stated GitHub repository of Convergence Spirals

USI-CHoCH

by skipp-dev
1 stars

Calculates a multi-speed RSI system across six lengths to identify Change of Character (CHoCH) market structure shifts. The indicator overlays signals on the main chart, combining volume filter thresholds, OBV divergence analysis, anticipation proximity marker

Indicator v6 SMC / ICT / price actionOscillators & momentum
Updated 3 days ago · None stated GitHub repository of USI-CHoCH

Price Volume Divergence (PVD)

by mushroom-men-Trading
2 stars

The Price Volume Divergence (PVD) indicator calculates the rate of change for price and volume over user-defined lookback periods. It evaluates divergence by comparing price momentum against volume momentum, scaling the output by their combined magnitude. The

Indicator v6 VolumeOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Price Volume Divergence (PVD)

This strategy calculates regular and hidden divergences across selectable momentum oscillators, including RSI, CCI, and MFI, and plots volatility-based divergence zones. It displays oscillator dynamics in a separate pane while projecting support and resistance

Strategy v6 DivergenceOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Oscillator Divergence Zones [WavesUnchained] — Strategy

Fractals with Divergence Scanner is an overlay indicator that combines Exponential Moving Averages, an eight-line EMA ribbon cloud, and WaveTrend divergence analysis. It calculates baseline EMA trends alongside WaveTrend oscillators to detect regular and hidde

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Fractals with Divergence Scanner
330 stars

MACD + Divergences [Alorse] is a momentum strategy that calculates the MACD oscillator and identifies regular and hidden divergences using pivot high and low points. It filters trade signals with dual Exponential Moving Averages (EMA 150 and 600) to ensure tra

Strategy v4 Oscillators & momentumDivergence Repaints
Updated 2 months ago · None stated GitHub repository of MACD + Divergences [Alorse]

Neural Network

by zhuzp98
1 stars

A Pine version 4 strategy that scores long and short setups by adding weighted votes from many indicator conditions: EMA trend, SuperTrend, Parabolic SAR, Hull moving average, RSI, MACD, WaveTrend, stochastic, Bollinger Bands and ATR. It trades when the score

Strategy v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Neural Network
330 stars

This strategy plots a MACD line, signal line, and colored histogram in a separate pane. The fast and slow averages and the signal line can each use SMA or EMA. Optional markers show MACD and signal crosses. Pivot lookbacks scan the oscillator for regular and h

Strategy v4 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of MACD + Divergences [Alorse]

Pivot Momentum Structure plots a selectable oscillator in a separate pane and scores momentum against confirmed price pivots. It classifies higher highs, higher lows, lower highs and lower lows, then marks regular and hidden bullish or bearish divergences plus

Indicator v6 Oscillators & momentumDivergence
Updated 2 days ago · MIT GitHub repository of Pivot Momentum Structure [WavesUnchained]

LuxAlgo Chaos Weighted RSI

by eddiebelaval
7 stars

This indicator calculates a Chaos Weighted RSI that incorporates price chaos via a Fractal Dimension Index. It plots the resulting RSI line in a separate pane along with background fills for overbought and oversold conditions. Bullish and bearish divergences a

Indicator v6 Oscillators & momentumDivergence
Updated 3 months ago · None stated GitHub repository of LuxAlgo Chaos Weighted RSI

Relative Leg Efficiency (RLE) measures price efficiency across pivot-to-pivot movement legs. Plotted in a separate pane with chart pivot overlays, it calculates path distance, execution duration, and counter-pressure to produce efficiency scores. Traders can a

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Relative Leg Efficiency (RLE) - Panel + Chart [WavesUnchained]

Polarity Divergences

by ivansoft
1 stars

An indicator on the price chart that compares the direction of each chart bar with the net direction of the smaller intrabars inside it, fetched from a lower timeframe chosen by the chart timeframe. When the two disagree, the candle is coloured orange. Optiona

Indicator v5 Divergence
Updated 1 year ago · None stated GitHub repository of Polarity Divergences
9 stars

This indicator plots a smoothed RSI in a separate pane with a signal line, a 50 midline, and configurable overbought and oversold bands. It colors momentum long or short, fills the oscillator against the signal and the zones, and draws a histogram. Optional ma

Indicator v6 Oscillators & momentumDivergence
Updated 2 days ago · MIT GitHub repository of RSI Advanced [WavesUnchained]

Swing Conviction Radar measures the strength of individual price swings by calculating a composite conviction score from 0 to 100 at confirmed pivots. It evaluates three swing components: ATR-normalized speed, trend cleanliness (fraction of on-trend bars), and

Indicator v6 Oscillators & momentumVolume
Updated 2 days ago · MIT GitHub repository of Swing Conviction Radar [WavesUnchained]

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
13 stars

Ruckard Squeezed C005 is a strategy that identifies divergence patterns based on section height changes in the Squeeze Momentum indicator. It evaluates transitions between histogram color phases to detect momentum peaks for long and short entries. Trades are m

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Squeezed C005
13 stars

Ruckard Squeezed E004 is a price-chart strategy that compares successive Squeeze Momentum colour-section changes. A smaller squeeze value with a higher price opens a short; a higher squeeze value with a lower price opens a long. Direction can be limited to lon

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Ruckard Squeezed E004
13 stars

Calculates divergence between price movement and the Squeeze Momentum Indicator transitions to identify entry conditions. A short position is opened when the squeeze value decreases while price makes a higher high during bullish momentum decay. A long position

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Ruckard Squeezed F001

Institutional CRT Engine

by alboogycOdR
6 stars

Institutional CRT Engine identifies Candle Range Theory setups by monitoring session-based time models for liquidity sweeps, Market Structure Shifts, and Fair Value Gaps. It plots CRT range boxes and signal labels directly on the main chart. Key settings allow

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Institutional CRT Engine
2 stars

Delta Volume Candles [LucF] plots replacement candles on the price chart and colors them from delta volume derived with lower-timeframe intrabar data. Users choose body coloring, including polarity or several volume-balance modes, optional gradients, and hollo

Indicator v5 VolumeCandlestick patterns
Updated 8 months ago · None stated GitHub repository of Delta Volume Candles [LucF]
2 stars

Delta Volume Channels calculates volume-weighted delta channels and reference moving averages using lower timeframe intrabar volume data. It plots directly on the main price chart, displaying dynamic channel fills, reference lines, delta volume-weighted lines,

Indicator v5 VolumeVolatility & bands
Updated 8 months ago · None stated GitHub repository of Delta Volume Channels [LucF]

Delta Volume Columns Pro

by regalouisei
2 stars

This indicator plots delta volume columns or a volume balance line in a separate pane. It calculates volume delta from buy and sell volumes and renders it as colored columns or a balance line. Users select calculation methods for balance such as on bar, averag

Indicator v5 VolumeDivergence
Updated 8 months ago · None stated GitHub repository of Delta Volume Columns Pro
6 stars

This indicator plots Candle Range Theory setups on the price chart. It marks session-based CRT ranges for one-hour or four-hour models and labels buy and sell signals after a liquidity sweep. Entry logic either waits for a market structure shift plus a fair va

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Institutional CRT Engine Dual Mode
2 stars

Divergence-Support/Resistence combines dual Zigzag pivot detection with momentum oscillators to identify divergence patterns and plot support and resistance levels directly on the price chart. Users can select from various built-in oscillators, such as RSI, CC

Indicator v5 DivergenceSupport & resistance Repaints
Updated 8 months ago · None stated GitHub repository of Divergence-Support/Resistence

OBV Signal Confluence

by vedkanani123
1 stars

An On-Balance Volume oscillator in a separate pane. It plots an OBV histogram against a moving average chosen from SMA, RMA, WMA or VWMA and marks regular and hidden divergence from pivots. Optional filters use a higher-timeframe confirmation, ADX and a volume

Indicator v6 VolumeDivergence
Updated 2 months ago · None stated GitHub repository of OBV Signal Confluence

This indicator plots calendar-spread context for commodity futures on the price chart. It maps the chart symbol to front and next month contracts automatically, or uses manual symbols, then calculates the spread as a difference or ratio. Fast and slow EMAs, a

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Vein: Spread Context [WavesUnchained]

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