Pine Library · 417 open-source scripts

Free Divergence Pine Scripts (page 9)

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

1 stars

This indicator calculates a smoothed momentum oscillator from price and plots many offset momentum lines in a separate pane as a colour-graded heat map. Moving average type, smoothing periods, the number of plotted lines and the colour theme are adjustable. It

Indicator v4 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of Angular Momentum Heat Map Plot
1 stars

A Pine v4 pane indicator that draws moving average based momentum as a heat map of up to 28 rows and adds pivot-based swing detection on the oscillator. Separate pivot lookbacks and range limits are provided for short, medium and long term swings, and colored

Indicator v4 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of Angular Momentum Swing Heat Map

This indicator calculates a smoothed momentum oscillator from price and plots many offset momentum lines in a separate pane as a colour-graded heat map. Moving average type, smoothing periods, the number of plotted lines and the colour theme are adjustable. It

Indicator v4 Oscillators & momentumDivergence
Updated 6 months ago · None stated GitHub repository of Angular Momentum Swing Heat Map Plot

Cyberpunk MACD Pulse Engine

by eddiebelaval
7 stars

The Cyberpunk MACD Pulse Engine is a momentum indicator displayed in a separate pane. It calculates MACD line, signal line, and histogram values using configurable parameters or preset modes tailored for scalping, swing trading, and custom setups. The indicato

Indicator v5 Oscillators & momentumDivergence
Updated 3 months ago · None stated GitHub repository of Cyberpunk MACD Pulse Engine

This strategy calculates the Stochastic oscillator (%K and %D) alongside overbought and oversold reference levels to detect divergences against price pivots. Using left and right pivot lookbacks on price and the Stochastic line, it identifies bullish and beari

Strategy v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Stoch Divergence v6

This indicator plots a Williams %R oscillator normalized from the native negative range onto a 0–100 scale in a separate pane. It smooths the core with a selectable average, draws a signal line, and marks midline and overbought or oversold crosses. Optional st

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

Cycle Swing Momentum

by mikeyhu70
1 stars

This indicator plots an adaptive swing momentum oscillator in a separate pane, built from custom moving averages and a cycle length setting. It can read an internal lower timeframe, chosen automatically or by hand, to produce a signal line. Optional divergence

Indicator v4 Oscillators & momentumDivergence Repaints
Updated 6 months ago · None stated GitHub repository of Cycle Swing Momentum

This indicator calculates a custom ZigZag engine directly on the price chart to identify market structure and classic chart patterns. It automatically detects ABC corrections, symmetrical and sloped triangles, Wolfe waves, and Sperandeo 1-2-3 reversal patterns

Indicator v6 Support & resistanceTrend Repaints
Updated 2 days ago · MIT GitHub repository of ZigZag Patterns [WavesUnchained]

Lower Forecast

by g-moe
3 stars

Lower Forecast is an oscillator indicator drawn in a separate pane based on the Market Forecast framework. It calculates three momentum curves—Intermediate, Nearterm, and Momentum—using fast stochastic formula variations across short and medium lookback window

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of Lower Forecast
1 stars

This strategy estimates intrabar volume delta using bar ranges and volume, smoothing it with a moving average to detect divergence against price action. Trades are taken when bullish or bearish divergences align with a long-term EMA trend filter. Position exit

Strategy v6 VolumeDivergence
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Volume Delta
3 stars

This indicator calculates standard MACD line, signal line, and histogram values while evaluating swing high and swing low pivot points on price and MACD to detect divergence. It compares recent pivot levels to identify higher highs, lower lows, and trend state

Indicator v5 Oscillators & momentumDivergence Repaints
Updated 5 months ago · None stated GitHub repository of MACD - Divergence
1 stars

The strategy calculates the Stochastic oscillator using specified K and D periods, then detects bullish and bearish divergences between price pivots and the D line. Bullish signals occur when price forms lower lows while Stochastic forms higher lows within the

Strategy v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of TN Stochastic Causal Divergence

TN_CMO_v26

by raybird
1 stars

The TN_CMO_v26 strategy calculates the Chande Momentum Oscillator and applies causal divergence filters against price action within a trend regime defined by a 200-bar EMA. It generates long entries on bullish divergence or CMO crossing above negative extreme

Strategy v6 DivergenceOscillators & momentum Repaints
Updated 2 months ago · None stated GitHub repository of TN_CMO_v26
2 stars

This indicator splits volume into buying and selling portions from candle body and wick proportions, then measures the linear-regression slope of those series over a chosen period. It plots the resulting trend strength in a separate pane as columns or another

Indicator v5 VolumeTrend
Updated 8 months ago · None stated GitHub repository of KINSKI Volume Regression Trend

MFI Divergences

by g-moe
3 stars

This indicator plots price data and is designed to detect divergences between price action and the Money Flow Index (MFI). It uses pivot highs and lows to identify potential regular and hidden bullish or bearish divergence signals. By evaluating momentum shift

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences

TnS_StochDiv_V6

by raybird
1 stars

This Pine Script strategy detects causal reversals using a smoothed stochastic oscillator to track momentum. It identifies harmonic divergences in price versus the oscillator and applies a Kronos resonance proxy based on phase coherence. ATR dynamically sets s

Strategy v6 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of TnS_StochDiv_V6
3 stars

This indicator plots the Money Flow Index in a separate pane and marks bullish and bearish divergence from pivot highs and lows. It stores recent pivot prices, MFI values, and bar indexes, then checks regular or hidden divergence across a chosen number of dots

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences Lower
3 stars

This indicator calculates the Money Flow Index (MFI) and detects regular and hidden divergences between price action and the MFI oscillator in a separate pane. It identifies high and low pivot points using a configurable lookback length and evaluates trade con

Indicator v5 Oscillators & momentumDivergence Repaints
Updated 5 months ago · None stated GitHub repository of MFI Divergences Lower
3 stars

The MFI Divergences Lower v2 indicator calculates the Money Flow Index (MFI) and plots it in a separate pane along with overbought, oversold, and middle threshold lines. It identifies regular and hidden bullish or bearish divergences by comparing price swing p

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of MFI Divergences Lower v2
2 stars

Oscillator Workbench — Chart plots a configurable blend of two built-in oscillators and an optional external oscillator on the price chart. It draws a weighted oscillator line and a reference moving average, coloring both by successive up or down states. Users

Indicator v5 Oscillators & momentumMoving averages
Updated 8 months ago · None stated GitHub repository of Oscillator Workbench — Chart [LucF]

This overlay indicator plots three moving averages chosen from EMA, SMA, HMA, VWMA, or RMA. Inputs also configure Stochastic RSI and RSI lengths, buy and sell thresholds, and an optional RSI divergence filter with its own lookback. A session window can restric

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner

This indicator plots pivot trendlines on the price chart and scans for divergences using RSI. It combines multiple moving averages, stochastic RSI indicators, and multi-timeframe stochastic RSI to generate buy and sell signals based on confluence. Entries foll

Indicator v5 TrendDivergence Repaints
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner

This strategy draws on the price chart and manages long and short entries around pivot trendlines. It filters signals with three configurable moving averages, Stochastic RSI, a higher-timeframe Stochastic RSI, and optional RSI divergence. A session window can

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner Strategy

This strategy combines triple moving average trend filtering with Stochastic RSI levels and optional RSI divergence signals to generate long and short trade entries. It uses Average True Range multipliers to define dynamic take profit and stop loss levels for

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner Strategy

This price-chart indicator finds swing highs and lows with a user-set pivot length and classifies them as higher high, lower high, higher low, or lower low. It tracks a trend state and the latest swing signal from those pivots. The same swing comparison is run

Indicator v5 Candlestick patternsSupport & resistance
Updated 5 months ago · None stated GitHub repository of Price Action Candles with Pivot Trendlines

Neglected Volume by DGT

by regalouisei
2 stars

This indicator calculates relative volume metrics and combines them with On Balance Volume (OBV) momentum and price-OBV correlation in a separate pane. It evaluates volume strength against simple moving averages and standard deviation thresholds, while offerin

Indicator v5 VolumeOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Neglected Volume by DGT
3 stars

Stochastic Divergences calculates standard Stochastic Oscillator lines (%K and %D) and scans for regular and hidden divergences against price action. It evaluates pivot highs and lows over a user-defined pivot lookback period to compare oscillator peaks and tr

Indicator v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of Stochastic Divergences

ETH_buy_3commas

by hasnocool
106 stars

This strategy overlays a Cipher B style WaveTrend study on the price chart and is titled for Ethereum buy alerts aimed at 3Commas. It calculates a WaveTrend channel and a short moving average, and can mark buy, sell, gold, and divergence dots. Settings change

Strategy v4 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of ETH_buy_3commas

Golden Buy

by hasnocool
106 stars

This strategy runs on the price chart under the title golden buy. It sets cash order size and a percent commission. Traders adjust an ATR stop-loss multiplier and a risk-reward ratio, and they can enable shorts or divergence filters. The visible inputs configu

Strategy v4 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Golden Buy
1 stars

The strategy detects smoothed RSI divergences on the price chart. It calculates smoothed RSI as the EMA of 3 applied to the 14-period RSI of close. Bullish divergence signals when smoothed RSI is below 40, with smoothed RSI rising over five bars while close ex

Strategy v6 Oscillators & momentumDivergence
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 03 - rsi smooth divergence
3 stars

The Divergence Scanner is an indicator that detects divergences using the Hull Moving Average. It calculates the high-low average price as the source and applies a Hull Moving Average with length 21 and a lookback of 2. Users can enable the display of Hull sup

Indicator v4 DivergenceMoving averages
Updated 5 months ago · None stated GitHub repository of Divergence Scanner

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