Pine Library · 417 open-source scripts

Free Divergence Pine Scripts (page 6)

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

VCP Setup

by ankurksoni
1 stars

A price-chart overlay that scans for volatility contraction setups, mainly on daily charts. It counts bullish divergences between price and cumulative volume delta built from intrabar data, within a lookback window, and checks that price sits near the range hi

Indicator v6 VolumeVolatility & bands
Updated 2 days ago · None stated GitHub repository of VCP Setup

Quad Rotation 40 4

by rubbermetal
1 stars

Quad Rotation 40 4 is the slow pane of a four-stochastic setup with periods 9, 14, 40 and 60. It plots the 40/4 stochastic K and D lines in a separate pane with oversold and overbought zones, K/D cross triangles inside extreme zones, and a convergence band wei

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of Quad Rotation 40 4

(JS) Squeeze Pro 2

by amico1234
1 stars

This indicator is built for a separate pane and compares Bollinger Bands with three Keltner Channel widths to mark low, mid, and high squeeze conditions. Length, price source, and moving-average type for both calculations are selectable among SMA, EMA, WMA, VW

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of (JS) Squeeze Pro 2

Divergenced E005

by ruckard
13 stars

Strategy identifying market entries based on Squeeze Momentum Indicator divergence patterns and exiting via Curie Closing Lines moving averages. It evaluates color transitions in the squeeze momentum histogram against price movements to detect divergence condi

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Divergenced E005
3 stars

This indicator plots a composite momentum oscillator in a separate pane, featuring a hyper wave calculation and an integrated smart money flow oscillator. It detects both bullish and bearish divergences using an adjustable sensitivity threshold. Additional vis

Indicator v5 Oscillators & momentumDivergence
Updated 12 months ago · None stated GitHub repository of Lux Algo - Oscillator Matrix

Alper

by avatar-lavventura
2 stars

This strategy combines a WaveTrend oscillator with a dual-period RSI differential to generate trend-following entries in a separate indicator pane. It calculates fast and slow RSI values, alongside WaveTrend channel lines and overbought or oversold thresholds.

Strategy v4 Oscillators & momentumDivergence
Updated 7 months ago · None stated GitHub repository of Alper

SMC HTF Confluence

by skipp-dev
1 stars

This indicator plots HTF SMC confluence signals in a separate pane. It visualizes ATR regime states from compression through expansion and exhaustion using custom colors. Squeeze markers indicate on or released states while reversal context displays scores for

Indicator v6 SMC / ICT / price actionVolatility & bands
Updated 3 days ago · None stated GitHub repository of SMC HTF Confluence

Quad Rotation 60 10

by rubbermetal
1 stars

Quad Rotation 60 10 is the slowest pane of a four-stochastic setup with periods 9, 14, 40 and 60. It plots the 60/10 stochastic K and D lines in a separate pane with oversold and overbought zones, K/D cross triangles inside extreme zones, and a convergence ban

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of Quad Rotation 60 10

Divergenced F002

by ruckard
13 stars

This strategy detects momentum divergences based on shifts between color states of the Squeeze Momentum indicator. It enters long positions when lower price lows form alongside higher oscillator values, and enters short positions on higher price highs with low

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced F002

Nexus Fusion Engine ML

by vedkanani123
1 stars

An oscillator in a separate pane, adapted from an earlier oscillator under an open license. It smooths price with a selectable method such as DEMA, adds a signal line and marks crosses with dots. Overbought and oversold zones default to 80 and 20. Optional lay

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of Nexus Fusion Engine ML

Quad Rotation 9 3

by rubbermetal
1 stars

Quad Rotation 9 3 is the fast pane of a four-stochastic setup with periods 9, 14, 40 and 60. It plots the 9/3 stochastic K and D lines in a separate pane with oversold and overbought zones, K/D cross triangles inside extreme zones, and a convergence band weigh

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of Quad Rotation 9 3
1 stars

This indicator calculates the MACD histogram from the fast and slow exponential moving averages. It plots the MACD line, signal line, and a histogram divergence column on a separate pane. The histogram divergence uses green columns for positive changes and red

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of [Z] MACD Hist Divergence

Divergenced G003

by ruckard
13 stars

Divergenced G003 is a strategy that identifies momentum divergences based on Squeeze Momentum Indicator color transitions to trigger long and short entries. Trades are exited using Curie closing moving average lines or configurable percentage-based stop loss,

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Divergenced G003

Ultimate Oscillator - Eterna MCP

by EternaHybridExchange
9 stars

This strategy calculates the Ultimate Oscillator in a separate pane from buying pressure and true range over fast, medium, and slow lengths, combined with a four-two-one weighting. It enters long when the oscillator crosses above the oversold level while remai

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

Calculates the Relative Strength Index (RSI) and automatically detects regular and hidden bullish and bearish divergences against price movements. It identifies pivot highs and lows in both price and RSI across a configurable lookback window, drawing lines and

Indicator v5 Oscillators & momentumDivergence
Updated 11 months ago · Custom licence GitHub repository of RSI Divergence Detector [Lab]
3 stars

This indicator plots a Traders Dynamic Index in a separate pane and scans it for regular and hidden divergences. It builds the index from a smoothed RSI, a signal line, and a longer baseline, then compares price and oscillator pivots over a lookback. Users can

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of BTMM TDI Divergence Scanner
2 stars

Calculates the Relative Strength Index oscillator in a separate pane with configurable overbought and oversold thresholds. Includes options for smoothing the RSI line using various moving averages or Bollinger Bands, gradient fill zones, and regular divergence

Indicator v6 Oscillators & momentumVolatility & bands
Updated 11 days ago · MIT GitHub repository of RSI = Relative Strength Index

RSI [SystemAlpha]

by iamc1oud
56 stars

This indicator plots a standard Relative Strength Index (RSI) in a separate pane alongside customizable overbought and oversold threshold levels with shaded fills. It identifies pivot highs and lows on the oscillator to detect regular and hidden bullish and be

Indicator v4 Oscillators & momentumDivergence Repaints
Updated 2 months ago · None stated GitHub repository of RSI [SystemAlpha]

Divergenced H002

by ruckard
13 stars

Divergenced H002 is an automated trading strategy designed to identify divergence setups using transitions in the Squeeze Momentum Indicator combined with Curie moving average closing lines for exit conditions. It detects bearish divergence when momentum weake

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced H002
1 stars

This indicator tracks relative divergence among five user-selected crypto perpetual symbols and plots the result in a separate pane. It scores each symbol from a twelve-bar log return scaled by ATR, assigns long or short direction, and requires RSI above 40 be

Indicator v6 DivergenceOscillators & momentum
Updated 12 days ago · None stated GitHub repository of DEPV2 C4 · Ayrışma Takibi

ROC MA Slope

by rubbermetal
1 stars

ROC MA Slope plots two smoothed rate of change lines, a fast and a slow one, in a separate pane. Smoothing can be SMA or EMA, and each line has its own slope measured with linear regression. Optional layers include a histogram, fills, acceleration coloring, a

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of ROC MA Slope

TTM Squeeze Divergence

by TamaraKGreen
46 stars

The TTM Squeeze Divergence indicator plots a classic TTM Squeeze momentum oscillator in a separate pane alongside Bollinger Bands and Keltner Channels squeeze status dots on the zero line. It detects regular and hidden bullish and bearish divergences between p

Indicator v6 Oscillators & momentumVolatility & bands Repaints
Updated 7 weeks ago · None stated GitHub repository of TTM Squeeze Divergence

Divergenced I002

by ruckard
13 stars

Divergenced I002 is a trading strategy that identifies entry points using Squeeze Momentum Indicator divergences across price and momentum structure. Long positions trigger on bullish momentum divergences, while short positions trigger on bearish divergences.

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced I002
1 stars

An indicator that reads a user-supplied CSV or data file published through Pine Seeds, using column index and delimiter settings, and overlays the external close, high and low on the current chart. Extras include an OLS regression channel, a z-score channel, a

Indicator v5 DivergenceMean reversion
Updated yesterday · None stated GitHub repository of External Data Reader Extended

RSI Divergence

by rubbermetal
1 stars

RSI Divergence subtracts a slow RSI from a fast RSI and plots the difference as a four-color histogram in a separate pane. Color shows whether the gap is positive or negative and whether it is growing or shrinking. Markers appear on the bar where the gap cross

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of RSI Divergence

Divergenced J001

by ruckard
13 stars

Divergenced J001 is a price-chart strategy that finds squeeze-momentum divergences and can send Zignaly alert messages. It shorts when a light-green to dark-green squeeze section shows a smaller value while price is higher, and longs on the opposite red-sectio

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced J001
9 stars

This indicator plots a heuristic volume-balance oscillator in a separate pane. It estimates signed volume from the close location inside each bar, multiplies that by volume, and sums the proxy over a rolling window. The sum is scaled between minus one and plus

Indicator v6 VolumeOscillators & momentum
Updated 2 days ago · MIT GitHub repository of CVD Bias [WavesUnchained]

P-MACD TARAMA2

by gocaman
3 stars

P-MACD TARAMA2 calculates a MACD from a fast and slow moving average and plots the MACD line, signal line, and histogram in a separate pane. It marks MACD and signal crossovers with circles and includes pivot-based bullish and bearish divergence settings. User

Indicator v5 Oscillators & momentumDivergence
Updated yesterday · None stated GitHub repository of P-MACD TARAMA2

RSI Window

by rubbermetal
1 stars

RSI Window shows a relative strength index in a separate pane with a color gradient and overbought and oversold zone fills. It can also draw a faster RSI and a histogram of the gap between the fast and standard RSI. Up to five exchange symbols, defaulting to B

Indicator v6 Oscillators & momentumDivergence
Updated 4 months ago · MPL-2.0 GitHub repository of RSI Window

Divergenced K002

by ruckard
13 stars

This strategy enters on divergences between Squeeze Momentum section changes and price, confirming the pattern across two pairs at once. A smaller squeeze with higher price opens a short; a higher squeeze with lower price opens a long. Curie closing moving ave

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced K002

The Stock and NQ Futures Convergence Strategy identifies trading opportunities by comparing the Relative Strength Index of the active chart stock against NQ futures. It enters a long position when NQ RSI rises above the upper threshold while the stock RSI stay

Strategy v5 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Stock and NQ Futures Convergence Strategy
2 stars

This indicator calculates the Relative Strength Index from a chosen price source and length and plots it in a separate pane. It draws horizontal bands at 70, 50, and 30 and fills the area between the outer bands. An optional moving average can smooth the RSI u

Indicator v6 Oscillators & momentumMoving averages
Updated 5 weeks ago · None stated GitHub repository of Relative Strength Index

RSI Divergence

by Web3Degenerate
2 stars

The indicator detects RSI divergences on the price chart. It calculates the RSI using the close prices with a configurable length and identifies potential trend reversals by comparing swings in price and RSI values. Bullish divergence is signaled when price fo

Indicator v5 Oscillators & momentumDivergence
Updated 2 years ago · None stated GitHub repository of RSI Divergence
56 stars

This indicator plots WaveTrend Oscillator values along with MFI and RSI areas on the chart. Colored circles and dots indicate buy and sell signals at wave crossings, overbought and oversold levels. Purple triangles mark regular and hidden divergences. It draws

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

Divergenced L002

by ruckard
13 stars

Divergenced L002 is a trading strategy that identifies divergence setups by tracking state changes in the Squeeze Momentum Indicator relative to price extremes. It enters trades when price and momentum diverge across consecutive momentum color transitions. Pos

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced L002

The indicator scores whether a counter-move against the dominant structure is maturing and whether price has started turning back. It plots a composite score in a separate pane from weighted context, correction maturity, and exhaustion, scaled by trigger and a

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · MIT GitHub repository of Directional Probability Engine v2 [WavesUnchained]

Davo Strategy

by GreyssonEnterprises
1 stars

A strategy version of a W and M pattern detector that looks for five-point double-bottom and double-top shapes in price, on-balance volume and optionally Williams %R, MFI, RSI and directional movement. Each source has strict matching, maximum width and offset

Strategy v4 Oscillators & momentumDivergence
Updated 2 months ago · MIT GitHub repository of Davo Strategy

Diverlong A002

by ruckard
13 stars

Diverlong A002 is an automated trading strategy designed for cryptocurrency pairs on intraday timeframes. It detects classic bullish and bearish divergences by comparing price changes against transitions in the Squeeze Momentum Indicator. Positions are exited

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong A002

Davo Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator that searches for W and M shapes, meaning five-point double-bottom and double-top patterns, in price, on-balance volume and optionally Williams %R, MFI, RSI and directional movement. Unlike the original it allows patterns to form over more than fi

Indicator v4 Oscillators & momentumDivergence
Updated 2 months ago · MIT GitHub repository of Davo Strategy Indicator

Diverlong B002

by ruckard
13 stars

This strategy enters when Squeeze Momentum color-section changes diverge from price, comparing the latest change with a prior one and confirming the divergence across two pairs. A smaller squeeze value with a higher price opens a short, while a larger squeeze

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong B002

This indicator expands Alexander Elder's Bull Power and Bear Power concept into a multi-model pressure analysis system displayed in a separate pane. It calculates bull, bear, and net pressure alongside dominance, impulse, and acceleration using selectable movi

Indicator v6 Oscillators & momentumDivergence
Updated 2 days ago · MIT GitHub repository of Elder Ray Pressure Engine [WavesUnchained]

MACD_Crossover_STEPFUN

by eltonaguiar
4 stars

This strategy enters long when the MACD line crosses above its signal line and short when it crosses below. Optional filters require the histogram to exceed a threshold, price to sit on the matching side of a simple moving average, and a simplified three-bar d

Strategy v5 Oscillators & momentumMoving averages
Updated yesterday · None stated GitHub repository of MACD_Crossover_STEPFUN

TMA RSI Divergence

by rajatjpatel
1 stars

A separate-pane RSI divergence tool written in Pine v4. It plots a 14-period RSI in yellow with a 50-period smoothed average and a 50 midline, then detects pivot lows and highs of the RSI within a lookback range of 5 to 60 bars. Labels mark regular bullish, hi

Indicator v4 DivergenceOscillators & momentum
Updated 4 years ago · None stated GitHub repository of TMA RSI Divergence

Diverlong C002

by ruckard
13 stars

Diverlong C002 is a trading strategy designed to identify entries using Squeeze Momentum Indicator divergences and execute exits based on Curie Closing Lines. Long and short signals trigger when price movements contradict Squeeze Momentum values across indicat

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong C002
1 stars

This volume divergence indicator detects bullish and bearish divergences on the price chart. Bullish divergence occurs when price forms a lower low but volume forms a higher low, and bearish divergence when price forms a higher high but volume forms a lower hi

Indicator v5 DivergenceVolume
Updated 8 months ago · None stated GitHub repository of VolDivAlgo (Volume Divergence)
1 stars

This indicator plots a standard MACD line, signal line, and color-coded histogram in a separate pane, with a zero line. It finds pivot highs and lows on both price and the histogram using a shared pivot length. Alerts fire when a histogram pivot high or low is

Indicator v5 Oscillators & momentumDivergence
Updated 9 months ago · None stated GitHub repository of MACD Histogram 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