Pine Library · 417 open-source scripts

Free Divergence Pine Scripts

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

About Divergence Scripts

Divergence is when price makes a new high or low and the oscillator does not. Scripts find it automatically by comparing swing points in price with swing points in the indicator.

A swing is only confirmed some bars after it happens, so most divergence labels are drawn back in time. Check how many bars each script waits and whether its labels can disappear.

53 of these 417 scripts are marked Repaints, or read higher-timeframe data with lookahead on.

Before You Use One

Divergence: Indicators, Strategies and Libraries

Trap Longs

by ProfHamzaNaveed
43 stars

This indicator tracks and visualises cryptocurrency derivatives positioning data across major perpetual exchanges, including Binance, BitMEX, and Kraken. It calculates net longs, net shorts, delta, or position ratios and plots them in a separate pane as candle

Indicator v5 VolumeDivergence
Updated 9 months ago · None stated GitHub repository of Trap Longs
25 stars

Awesome Oscillator Divergences calculates the Awesome Oscillator using the difference between fast and slow exponential moving averages of the median price. It identifies regular and hidden bullish and bearish divergences by comparing pivot highs and lows on t

Indicator v4 DivergenceOscillators & momentum
Updated 6 years ago · None stated GitHub repository of Awesome Oscillator Divergences
23 stars

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

Indicator v4 Support & resistanceDivergence
Updated 3 years ago · None stated GitHub repository of Daily High and Low Strategy

Bandz HTF

by samuelharting
18 stars

Bandz HTF projects higher-timeframe candle structures, ranges, and key levels directly onto the main price chart. It visualizes multiple configurable timeframe lanes from intraday to weekly alongside primary and macro range levels, including 25%, 50%, and 75%

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

This indicator implements a full Chanlun pipeline on the price chart. It merges contained bars, marks top and bottom fractals, and connects alternating fractals into strokes. Overlapping strokes form pivot boxes, and MACD area ratios flag trend or consolidatio

Indicator v6 Support & resistanceDivergence
Updated 2 months ago · GPL-3.0 GitHub repository of 缠论 - 分型与笔 [Chanlun Core]

RSI Divergence

by paulieb89
9 stars

This indicator plots RSI in a separate pane and marks regular divergences between confirmed price pivots and RSI pivots. A bullish signal requires a lower price low, a higher RSI low, and an RSI reading in the oversold zone, within a set bar gap. Bearish detec

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · MIT GitHub repository of RSI Divergence

Larper Suite

by DeolinNaidoo
8 stars

Larper Suite is an overlay indicator for ICT and quarterly-theory analysis. It plots true session, daily, weekly, monthly, and yearly opens plus prior and current high-low liquidity levels. It tracks multi-asset SMT, swing divergence, fair-value-gap fills, and

Indicator v6 SMC / ICT / price actionDivergence Repaints
Updated 3 months ago · GPL-3.0 GitHub repository of Larper Suite

This strategy combines fractal-based supply and demand order blocks with Awesome Oscillator divergence detection. It generates long signals when price interacts with a demand zone alongside a confirmed bullish divergence, and short signals at supply zones with

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 5 weeks ago · None stated GitHub repository of Combined Strategy - Supply/Demand + AO Divergence

TradingFlow: Stoch X

by realanthonyc
3 stars

TradingFlow: Stoch X is a Stochastic oscillator indicator plotted in a separate pane. It calculates standard percent K and percent D lines along with secondary crossover lines to generate trade signals outside overbought and oversold bands. The indicator autom

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · MPL-2.0 GitHub repository of TradingFlow: Stoch X

JINADA Down

by cathxrsys
3 stars

JINADA Down is a multi-oscillator visualizer rendered in a separate chart pane. It constructs an oscillator map using Momentum, Commodity Channel Index, Stochastic, and RSI metrics. The indicator calculates and identifies standard and hidden bullish and bearis

Indicator v6 Oscillators & momentumDivergence
Updated 9 months ago · GPL-3.0 GitHub repository of JINADA Down

SG Market Cipher B

by jeffAquinn
3 stars

SG Market Cipher B is an oscillator indicator plotted in a separate pane that combines WaveTrend and RSI calculations to identify momentum and potential trend reversals. It generates visual signal dots (buy, sell, gold, and divergence dots) based on overbought

Indicator v4 Oscillators & momentumDivergence
Updated 2 years ago · None stated GitHub repository of SG Market Cipher B

Divergence Signal Alerts

by allanninal
2 stars

This indicator detects regular and hidden divergences between price and RSI or MACD histogram oscillators, drawing lines and arrows directly on the price chart. It identifies swing highs and lows using configurable left and right pivot lookback windows, evalua

Indicator v6 DivergenceOscillators & momentum
Updated 7 days ago · Custom licence GitHub repository of Divergence Signal Alerts

This multi-timeframe indicator plots technical analysis tools directly on the price chart using 1-hour higher timeframe data. It calculates 1-hour Exponential Moving Averages (20, 30, 40), a custom Rank Correlation Index (RCI), and MACD divergence signals. Add

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 weeks ago · None stated GitHub repository of Ver15 Environment Recognition (Provisional Pivot)

Trust Me Bro Strategy

by moonyroy
2 stars

A trading strategy that uses an RSI state machine tracking 50-level crossovers, pullbacks, and hidden divergences. Entries require confirmation from optional confluence filters, including an EMA touch, Fibonacci retracement zones, and Ichimoku cloud conditions

Strategy v6 Oscillators & momentumDivergence
Updated 7 weeks ago · MIT GitHub repository of Trust Me Bro Strategy
2 stars

This overlay indicator approximates a Bookmap-style liquidity view from price and volume. It draws heatmap boxes where volume exceeds a rolling average, volume dots above a relative-volume filter, and a smoothed cumulative-delta proxy. Optional signals use abs

Indicator v6 VolumeSupport & resistance
Updated 6 months ago · None stated GitHub repository of Bookmap Heatmap & Order Flow
2 stars

Strong Wealth Magnet is an overlay indicator that scores price action and draws selected narrative layers on the price chart. Up to three modes can run together, including a Pro layout and a Six Eyes view that reviews past signals over a chosen window and labe

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of Strong Wealth Magnet
2 stars

ARPS Ultimate MultiStrategy Trading combines multiple technical indicators into a single chart overlay. It calculates and plots trend lines, moving averages, Ichimoku cloud components, Williams Alligator lines, and Fibonacci support and resistance levels direc

Indicator v4 TrendOscillators & momentum
Updated 6 months ago · None stated GitHub repository of ARPS Ultimate MultiStrategy Trading

This indicator combines five technical metrics normalized between 0 and 100 in a separate pane: RSI (with optional divergence detection), Stochastic, Relative Volatility Index (RVI), Average Directional Index (ADX), and Money Flow Index (MFI). Users can select

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TLC 0 to 100 Five Indicators VolMom

Complexity Trender

by panzmoravylab
2 stars

Complexity Trender is an indicator that combines EMA crossovers, RSI momentum, Stochastic signals, Bollinger Bands, ADX trend strength, volume analysis, and divergence detection to identify trends. It plots labels, trend lines, and a summary table directly on

Indicator v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Complexity Trender
2 stars

The Refined Multi-TF Crypto Analyzer plots technical analysis signals on the main price chart by combining multi-timeframe moving averages, RSI, ADX, and volume spikes. It checks for trend alignment between the chart timeframe and a higher timeframe, identifie

Indicator v6 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Refined Multi-TF Crypto Analyzer
2 stars

This indicator detects regular and hidden divergences across multiple technical indicators including RSI, MACD, Stochastic, CCI, momentum, OBV, and others. It calculates pivot points on a chosen source to identify bullish and bearish divergences, then plots co

Indicator v4 DivergenceOscillators & momentum
Updated 4 years ago · MIT GitHub repository of Divergence for Many Indicators v4

Matrix Trend BTR

by natalivm
1 stars

A price-chart overlay that draws an Ichimoku-style cloud and a moving average, then prints buy and sell triangles from a chosen engine: RSI crossing its average in the cloud trend direction, EMA trend reversals, or manual price-level rules. Extra optional sign

Indicator v6 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of Matrix Trend BTR
1 stars

A separate-pane chart port of a scanner's decision logic, intended to read setups bar by bar. It reproduces a Z-score regime engine, a weekly midline heat phase, absorption and climax markers, nine core checks and a final signal tree, plus an optional divergen

Indicator v6 TrendScreeners & dashboards Repaints
Updated 2 days ago · None stated GitHub repository of Reflex RCCE - Engine View

Koncorde Plus

by mphinance
1 stars

A volume-based oscillator pane built around the Koncorde idea of separating large and small participants, with pattern markers named Zero, Mirror, Bear Hug, Harpoon, Spring and Crossing that can be switched on or off. Optional layers add MACD dots, RSI or MFI

Indicator v6 VolumeOscillators & momentum
Updated 2 days ago · Custom licence GitHub repository of Koncorde Plus

Investment Master Indicator

by diwakarsingh01-tech
1 stars

A multi-module overlay aimed at stock investing, with a master toggle panel for each part. Modules include a percentage envelope, 52-week high and low, Bollinger Bands, Knoxville divergence, a set of four SMA lines, automatically merged support and resistance

Indicator v6 Support & resistanceVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of Investment Master Indicator

SMT Divergence

by Rickylel
1 stars

An indicator that detects SMT divergence between correlated markets, mainly NQ and ES. It pairs confirmed swing highs and lows from both instruments and draws a line and label when one market breaks its reference level and the other does not. The correlated as

Indicator v6 SMC / ICT / price actionDivergence Repaints
Updated 6 weeks ago · MIT GitHub repository of SMT Divergence

CVD

by Robwhitlow3
1 stars

A separate-pane indicator that plots cumulative volume delta, estimated from lower-timeframe bars by classing each sub-bar as buying or selling volume. The line resets by session (regular hours, extended hours, daily, or never) and is colored above and below z

Indicator v6 VolumeDivergence
Updated 2 months ago · MIT GitHub repository of CVD

RSI Ultra Signal

by mmdverse
1 stars

An overlay that reads RSI on five timeframes from 5 minutes to daily and scores each overbought or oversold event from one to five stars. Optional confirmations are a MACD cross, a position relative to the 200 EMA, a volume surge, divergence and agreement acro

Indicator v5 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of RSI Ultra Signal

This indicator plots an adaptive RSI on the price chart for gold. It calculates RSI with adaptive lookback and filters signals using EMA trend, higher timeframe bias, slope threshold, ATR volatility, and structure confirmation near swings. Signals appear as bu

Indicator v6 Oscillators & momentumDivergence

Detrended CVD Z-Score

by tthanhvu002sgu
1 stars

A Pine v6 separate-pane indicator that estimates delta from candle direction and volume, accumulates it and turns it into a Z-score over a rolling window, shown as a coloured histogram with a signal EMA and standard deviation lines. It adds divergence detectio

Indicator v6 VolumeDivergence
Updated 3 months ago · None stated GitHub repository of Detrended CVD Z-Score
1 stars

An oscillator in a separate pane that blends two readings into a composite bias from minus 100 to plus 100. One measures price impulse, rewarding large-body candles relative to ATR, and the other applies volume spread analysis using volume, spread and close lo

Indicator v5 VolumeOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Institutional Footprint + VSA
1 stars

ADX Trend Filter Pro is a separate-pane indicator built on the directional movement system. It plots ADX with DI plus and DI minus, classifies trend strength as weak, moderate, strong or very strong from adjustable thresholds, and overlays a fast and slow EMA

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MPL-2.0 GitHub repository of ADX Trend Filter Pro

MACD DEMA Pro

by ebarkinkaras-lang
1 stars

A separate-pane oscillator that builds a MACD from double exponential moving averages to reduce lag, with a signal line and a colored histogram that changes shade as momentum rises or falls. It can mark regular divergences using pivot lookback and offers an op

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MACD DEMA Pro

OMEGA ULTIMATE

by princeleuel-code
1 stars

An all-in-one smart money overlay that marks swing points, break of structure and change of character, order blocks, fair value gaps, liquidity levels and sweeps, a 50 percent equilibrium line, power-of-three session phases and SMT divergence. It adds a dashbo

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of OMEGA ULTIMATE

ARPS Convergent Pro V5

by ali-rajabpour
1 stars

Combines several oscillators in one separate pane: a WaveTrend style indicator, Elliott Wave Oscillator, RSI, Stochastic RSI, RSI divergence markers and an optional squeeze momentum display. Each component has its own show switch, so the pane can be reduced to

Indicator v5 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of ARPS Convergent Pro V5
1 stars

A Pine v4 separate-pane indicator that bundles several oscillators in one script: a WaveTrend line with crossover dots, an Elliott Wave Oscillator histogram, a money flow area, RSI with optional divergence, and optional stochastic momentum index, MACD, Ehlers

Indicator v4 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of ARPS OmniFusion Technical Suite
1 stars

A large all-in-one overlay built for the 30-minute chart that bundles many tools in one script. It includes the Williams Alligator and fractal reversal setups, divergence detection, RSI, an ATR-ADX trend gauge, EMA crosses on 30-minute, 4-hour and daily frames

Indicator v5 TrendOscillators & momentum Repaints
Updated 6 months ago · None stated GitHub repository of ARPS Ultimate Trading Solution (A)

This indicator calculates Kaufman's Efficiency Ratio normalized by an ATR ratio to create a dynamic volatility-adjusted threshold. It classifies market states into uptrend, downtrend, choppy, or consolidation regimes and colors price chart bars accordingly. It

Indicator v6 TrendVolatility & bands
Updated 6 months ago · None stated GitHub repository of Adaptive Regime Filter + Divergence (AER-VN) [KEYALGOS]
1 stars

An indicator that looks for smart money technique divergences between the chart symbol and up to two correlated symbols, by default two US equity index futures. It uses a zigzag pivot engine from an imported library to find swings, then draws link lines and la

Indicator v6 SMC / ICT / price actionDivergence Repaints
Updated 6 months ago · None stated GitHub repository of Cracks in Correlation (SMT)

Wirezard Wave Rider

by udhansingh
1 stars

An overlay that combines ADX, RSI, an impulse MACD, VIDYA and volume to draw buy and sell markers, swing pivot labels, divergence markers and Fibonacci levels. A multi-timeframe score uses three higher timeframes, automatic at two, four and eight times the cha

Indicator v6 TrendOscillators & momentum
Updated 7 months ago · MIT GitHub repository of Wirezard Wave Rider
1 stars

An order-flow proxy indicator that estimates delta from volume and the close position within each bar, then builds a cumulative delta line, relative volume and a delta z-score. Bull and bear signals need relative volume, delta and close-in-range thresholds, an

Indicator v6 VolumeDivergence Repaints
Updated 11 months ago · None stated GitHub repository of Institutional Orderflow Pro

Trend Analyzer MACD Enhanced

by panzmoravylab
1 stars

This indicator, drawn in a separate pane, combines MACD, RSI and volume analysis with divergence detection. It compares price extremes over the last twenty bars with MACD and RSI to flag bullish and bearish divergences, colours the background by trend and mark

Indicator v6 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Trend Analyzer MACD Enhanced

More Pine Script Categories

Browse the whole Pine Library

Related on ForexR

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.

Trade Your Charts With a Regulated Broker

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

Compare brokers