Indicator · Pine Script v6 · Own pane

Volume Accumulation

by everget

Volume Accumulation sums bar volume inside a chosen time bucket and plots the running total as columns in a separate pane.

View on GitHub

GitHub stars948on the repository
Pine versionv6current
Lines of code50
Settings4inputs
LicenceGPL-3.0
Last update10 days ago18 Oct 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

50 lines of Pine Script v6 from volume/volume_accumulation.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

volume_accumulation.pine
//@version=6
// Copyright (c) 2020-present, Alex Orekhov (everget)
indicator('Volume Accumulation', format = format.volume)

accumulationType = input.string('Daily', title = 'Type', options = ['Minutely', 'Hourly', 'Session', 'Daily', 'Monthly', 'Quarterly', 'Yearly'])
sessionInput = input.session('0900-1530', title = 'Session (only for \'Session\' type)')
includeWeekends = input(true, title = 'Include Weekends')
var session = sessionInput + (includeWeekends ? ':1234567' : '')

applyBarColors = input(true, title = 'Apply Bar Colors')

//---

_inSession(res, sess) => not na(time(res, sess))

min = minute(time)
h = hour(time)
s = _inSession(timeframe.period, session) ? 1 : 0
d = dayofmonth(time)
m = month(time)
q = int(math.ceil(m / 3))
y = year(time)

int period = switch accumulationType
    'Minutely' => min
    'Hourly' => h
    'Session' => s
    'Daily' => d
    'Monthly' => m
    'Quarterly' => q
    'Yearly' => y
    => d

var acc = 0.0
acc := period != period[1] ? volume : nz(acc[1]) + volume

var accPrev = 0.0
accPrev := period != period[1] ? acc[1] : accPrev

accColor = acc > accPrev ? #92df8bff : #fe9695ff
plot(acc, title = 'Accumulation', style = plot.style_columns, color = accColor)
barcolor(applyBarColors ? accColor : na, title = 'Bar Color')

var periodChangeColor = color.new(#ffcc80, 60)
var noneColor = #ffffff00

bgcolor(period != period[1] ? periodChangeColor : noneColor, title = 'Separator')

higherAlert = acc > accPrev
alertcondition(higherAlert, title = 'Higher Accumulation', message = 'Higher Accumulation')

Overview

The bucket can be minutely, hourly, session, daily, monthly, quarterly, or yearly, and the total resets when that period changes. Columns are green when the current total exceeds the previous period’s finished total and red when it does not. Optional bar colors use the same comparison. A background mark shows period changes, and an alert fires when accumulation is higher than the prior period.

Details

Published by

everget on GitHub

Type

Indicator, Pine Script v6

Draws

Separate pane below the chart

Category

Volume

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

pinepinescripttechnical-indicatorsindicatorsoscillatorbandsaveragetradingviewindicatormoving-average

Settings

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

SettingTypeDefaultVariable
TypestringDailyaccumulationType
Session (only for 'Session' type)session0900-1530sessionInput
Include WeekendsbooltrueincludeWeekends
Apply Bar ColorsbooltrueapplyBarColors
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

This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper
549 stars

Range Volume Change compares volume inside a chosen session window with the same window on the previous day and plots that change as a percentage. It accumulates volume during the window and, when enabled, volume outside it, drawing growing columns in a separa

Indicator v5 VolumeSessions & time Repaints
Updated 10 months ago · None stated GitHub repository of Range Volume Change
257 stars

This indicator builds a footprint of estimated buy and sell volume across price rows and plots it in a separate pane. It fills rows from bar low to high, stores volume per row, and draws buy and sell volume boxes, volume-profile boxes, row labels, and cumulati

Indicator v5 Volume Repaints
Updated 6 weeks ago · None stated GitHub repository of Footprint Delta Lite

Commitment Gauge

by harryguiacorn
219 stars

This indicator measures directional momentum by evaluating candlestick body proportions and volume over a user-defined lookback window. It computes the ratio of candle body to total range, weights the cumulative value by volume and absolute body size, and dete

Indicator v4 VolumeCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Commitment Gauge

Aggregate Signal

by capissimo
114 stars

This indicator builds an aggregate oscillator in a separate pane. It scales open, high, low, close, and volume into a 0 to 1 range, then averages scaled readings from MACD, a MACD histogram, RSI, stochastic, CCI, momentum, OBV, a directional index, volume-weig

Indicator v4 Oscillators & momentumVolume Repaints
Updated 1 year ago · None stated GitHub repository of Aggregate Signal

This indicator calculates the Bill Williams Market Facilitation Index as the high-low range divided by volume, or zero when volume is zero. It compares the index and volume with the previous bar and assigns one of four zones: green for both rising, fade for bo

Indicator v6 VolumeOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bill Williams Market Facilitation Index

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers