Indicator · Pine Script v6 · Own pane

DeltaPulse Wave [ChartPrime]

by theonetrade· code credited to ChartPrime

DeltaPulse Wave [ChartPrime] measures standardized volume delta momentum as a separate pane oscillator.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code159
Settings12inputs
LicenceMIT
Last update2 weeks ago7 Nov 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

159 lines of Pine Script v6 from assets/wave-chartprime-standardized-volume-delta-oscillator.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

wave-chartprime-standardized-volume-delta-oscillator.pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © ChartPrime

//@version=6
indicator("DeltaPulse Wave [ChartPrime]", "DeltaPulse Osc [ChartPrime]", overlay = false, precision = 2)

// --------------------------------------------------------------------------------------------------------------------}
// 📌 𝙐𝙎𝙀𝙍 𝙄𝙉𝙋𝙐𝙏𝙎
// --------------------------------------------------------------------------------------------------------------------{

int   waveLen     = input.int(20, "Wave Lookback", minval = 5, tooltip = "Period for calculating the relative delta strength.")
int   smoothLen   = input.int(5, "Smoothing", minval = 1, tooltip = "Smoothing period for the final wave.")
float obThreshold = input.float(25.0, "Upper Threshold (OB)", minval = 1.0, group = "Levels")
float osThreshold = input.float(-25.0, "Lower Threshold (OS)", maxval = -1.0, group = "Levels")
int   minGap      = input.int(5, "Min Divergence Gap", minval = 2, group = "Analysis", tooltip = "Minimum number of bars required between two peaks or troughs to confirm a divergence.")
bool  showLines   = input.bool(true, "Show Divergence Lines", group = "Analysis")

color bullColor  = input.color(#00ffbb, "Aggressive Buying", group = "Style")
color bearColor  = input.color(#ff0055, "Aggressive Selling", group = "Style")
color neutColor  = input.color(#6b7b8f, "Neutral Line", group = "Style")

// Dashboard Settings
bool   showDash     = input.bool(true, "Show Dashboard", group = "Dashboard")
string dashPos      = input.string("Top Right", "Position", options = ["Top Right", "Bottom Right", "Top Left", "Bottom Left"], group = "Dashboard")
string dashSize     = input.string("Small", "Size", options = ["Tiny", "Small", "Normal", "Large"], group = "Dashboard")

// --------------------------------------------------------------------------------------------------------------------}
// 📌 𝙄𝙉𝘿𝙄𝘾𝘼𝙏𝙊𝙍 𝘾𝘼𝙇𝘾𝙐𝙇𝘼𝙏𝙄𝙊𝙉𝙎
// --------------------------------------------------------------------------------------------------------------------{

// 1. Calculate Relative Delta Strength (RDS)
float buyVol      = close > open ? volume : 0.0
float sellVol     = close < open ? volume : 0.0
float smoothedBuy  = ta.ema(buyVol, waveLen)
float smoothedSell = ta.ema(sellVol, waveLen)
float smoothedTot  = ta.ema(volume > 0 ? volume : 1, waveLen)

float rdsRaw    = (smoothedBuy - smoothedSell) / (smoothedTot > 0 ? smoothedTot : 1) * 100
float deltaWave = ta.ema(rdsRaw, smoothLen)

// 2. Divergence Logic (Detection of local peaks)
bool isWaveHigh = deltaWave < deltaWave[1] and deltaWave[1] > deltaWave[2] and deltaWave[1] > (obThreshold * 0.2)
bool isWaveLow  = deltaWave > deltaWave[1] and deltaWave[1] < deltaWave[2] and deltaWave[1] < (osThreshold * 0.2)

// State Tracking for Divergences
var float lastPH     = 0.0
var int   lastPH_Idx = 0
var float lastWH     = 0.0
var int   lastWH_Idx = 0

var float lastPL     = 0.0
var int   lastPL_Idx = 0
var float lastWL     = 0.0
var int   lastWL_Idx = 0

bool bearDiv = false
bool bullDiv = false

// Bearish Divergence (Price HH, Wave LH with Min Gap)
if isWaveHigh
    if high[1] > lastPH and deltaWave[1] < lastWH and (bar_index[1] - lastPH_Idx) >= minGap
        bearDiv := true
        if showLines
            line.new(lastPH_Idx, lastPH, bar_index[1], high[1], xloc.bar_index, extend.none, bearColor, line.style_solid, 2, force_overlay = true)
            line.new(lastWH_Idx, lastWH, bar_index[1], deltaWave[1], xloc.bar_index, extend.none, bearColor, line.style_solid, 2)
    
    // Update anchors only if current peak is significant or enough gap has passed
    lastPH := high[1]
    lastPH_Idx := bar_index[1]
    lastWH := deltaWave[1]
    lastWH_Idx := bar_index[1]

// Bullish Divergence (Price LL, Wave HL with Min Gap)
if isWaveLow
    if low[1] < lastPL and deltaWave[1] > lastWL and (bar_index[1] - lastPL_Idx) >= minGap
        bullDiv := true
        if showLines
            line.new(lastPL_Idx, lastPL, bar_index[1], low[1], xloc.bar_index, extend.none, bullColor, line.style_solid, 2, force_overlay = true)
            line.new(lastWL_Idx, lastWL, bar_index[1], deltaWave[1], xloc.bar_index, extend.none, bullColor, line.style_solid, 2)

    lastPL := low[1]
    lastPL_Idx := bar_index[1]
    lastWL := deltaWave[1]
    lastWL_Idx := bar_index[1]

// --------------------------------------------------------------------------------------------------------------------}
// 📌 𝙑𝙄𝙎𝙐𝘼𝙇𝙄𝙕𝘼𝙏𝙄𝙊𝙉
// --------------------------------------------------------------------------------------------------------------------{

// Zero Line & Thresholds
plot(0, "Baseline", color = color.new(neutColor, 50), style = plot.style_linebr)
plot(obThreshold, "OB Level", color = color.new(neutColor, 80), style = plot.style_linebr)
plot(osThreshold, "OS Level", color = color.new(neutColor, 80), style = plot.style_linebr)

// Main Wave
waveColor = deltaWave > 0 ? bullColor : bearColor
wavePlot  = plot(deltaWave, "DeltaPulse Wave", color = waveColor, linewidth = 2)

// Centered Fill
fill(wavePlot, plot(0, display = display.none, editable = false),
     top_value    = deltaWave > 0 ? deltaWave : 0,
     bottom_value = deltaWave < 0 ? deltaWave : 0,
     top_color    = deltaWave > 0 ? color.new(bullColor, 40) : color.new(bullColor, 100),
     bottom_color = deltaWave < 0 ? color.new(bearColor, 40) : color.new(bearColor, 100))

// Divergence Signal Shapes (Oscillator Pane)
plotshape(bullDiv, "Bull Div Circle", shape.circle, location.bottom, bullColor, size = size.tiny, offset = -1)
plotshape(bearDiv, "Bear Div Circle", shape.circle, location.top, bearColor, size = size.tiny, offset = -1)

// Divergence Signal Shapes (Main Chart)
plotshape(bullDiv, "Bullish Divergence", shape.triangleup, location.belowbar, bullColor, text = "Bull", textcolor = bullColor, force_overlay = true, offset = -1)
plotshape(bearDiv, "Bearish Divergence", shape.triangledown, location.abovebar, bearColor, text = "Bear", textcolor = bearColor, force_overlay = true, offset = -1)

barcolor(waveColor)
// --------------------------------------------------------------------------------------------------------------------}
// 📌 𝘿𝘼𝙎𝙃𝘽𝙊𝘼𝙍𝘿
// --------------------------------------------------------------------------------------------------------------------{

var table dashTable = na
// Last Divergence
var string lastDivType = "None"
var color lastDivCol = chart.fg_color
if bullDiv
    lastDivType := "Bullish"
    lastDivCol := bullColor
if bearDiv
    lastDivType := "Bearish"
    lastDivCol := bearColor
if showDash and barstate.islast
    string pos = switch dashPos
        "Top Right"    => position.top_right
        "Bottom Right" => position.bottom_right
        "Top Left"     => position.top_left
        "Bottom Left"  => position.bottom_left
        => position.top_right

    string tSize = switch dashSize
        "Tiny"   => size.tiny
        "Small"  => size.small
        "Normal" => size.normal
        "Large"  => size.large
        => size.small

    dashTable := table.new(pos, 2, 4, color.new(chart.bg_color, 10), chart.fg_color, 1, chart.fg_color, 1)
    
    // Header
    table.cell(dashTable, 0, 0, "DeltaPulse", text_color = chart.fg_color, text_size = tSize, bgcolor = color.new(neutColor, 80))
    table.cell(dashTable, 1, 0, "Value",     text_color = chart.fg_color, text_size = tSize, bgcolor = color.new(neutColor, 80))
    
    // Wave Value
    table.cell(dashTable, 0, 1, "Wave",      text_color = chart.fg_color, text_halign = text.align_left, text_size = tSize)
    table.cell(dashTable, 1, 1, str.format("{0,number,#.##}", deltaWave), text_color = waveColor, text_size = tSize)
    
    // Trend
    table.cell(dashTable, 0, 2, "Trend",     text_color = chart.fg_color, text_halign = text.align_left, text_size = tSize)
    table.cell(dashTable, 1, 2, deltaWave > 0 ? "Bullish" : "Bearish", text_color = waveColor, text_size = tSize)
 
    table.cell(dashTable, 0, 3, "Last Div",  text_color = chart.fg_color, text_halign = text.align_left, text_size = tSize)
    table.cell(dashTable, 1, 3, lastDivType, text_color = lastDivCol, text_size = tSize)

Overview

DeltaPulse Wave [ChartPrime] calculates relative delta strength by taking the exponential moving averages of buying volume and selling volume normalized against total volume. The smoothed wave oscillates between customizable overbought and oversold thresholds. The script identifies bullish and bearish divergences between price action and delta wave peaks or troughs, optionally displaying divergence connection lines and an information dashboard on the chart.

Details

Published by

theonetrade on GitHub

Code credit

ChartPrime, as written in the script's header

Draws

Separate pane below the chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

algorithmic-tradingbacktestingccxtcryptofair-value-gapheikin-ashiohlcvorder-flowpine-scriptpinescriptpynecorepythonquantitative-financesupertrendtechnical-analysistrading-indicatorstradingviewtradingview-indicatorsvolume-profile

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Wave Lookbackint20waveLen
Smoothingint5smoothLen
Upper Threshold (OB)float25.0obThreshold
Lower Threshold (OS)float-25.0osThreshold
Min Divergence Gapint5minGap
Show Divergence LinesbooltrueshowLines
Aggressive Buyingcolor#00ffbbbullColor
Aggressive Sellingcolor#ff0055bearColor
Neutral Linecolor#6b7b8fneutColor
Show DashboardbooltrueshowDash
PositionstringTop RightdashPos
SizestringSmalldashSize
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Oscillator Suite

by TamaraKGreen
47 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 2 months ago · None stated GitHub repository of Oscillator Suite
11 stars

This indicator plots a smoothed Z-score of cumulative volume delta in a separate pane, showing whether buying or selling pressure is dominant and when the reading enters extreme zones. It marks spot accumulation, climax or exhaustion, and pivot-based price-vol

Indicator v6 Oscillators & momentumVolume Repaints
Updated 2 months ago · MIT GitHub repository of CVD Z-Score [NeuNue]
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 4 weeks ago · MIT GitHub repository of CVD Bias [WavesUnchained]

Apex Vector

by app-builder-sketch
1 stars

Apex Vector is a separate-pane oscillator that plots a smoothed vector and classifies efficiency against superconductor and resistive thresholds, with a high-heat warning color. Optional volume flux uses a volume-normalization length. Users set vector length,

Indicator v6 Oscillators & momentumVolume
Updated 11 months ago · GPL-3.0 GitHub repository of Apex Vector

Order Flow Overlay

by mrdungx2603
1 stars

Order Flow Overlay is a chart-overlay indicator that analyzes volume delta and momentum structure. It detects Cumulative Volume Delta (CVD) divergences and RSI divergences based on pivot high and low points, highlights Delta Peaks that exceed standard deviatio

Indicator v6 Oscillators & momentumVolume
Updated 9 days ago · None stated GitHub repository of Order Flow Overlay

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

More Oscillators & momentum scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers