Nicolas

Volume Drops: candles redrawn as split volume profiles with a VWAP shift

Studio Only
Category: Indicators By: Nicolas Created: December 2, 2026, 6:17 PM
December 2, 2026, 6:17 PM
Indicators
0 Comments
ProRealCode Script
Volume Drops: candles redrawn as split volume profiles with a VWAP shift

Volume Drops redraws the chart as drops: each group of candles becomes a volume profile cut in two. The first half of the period is drawn to the left, the second half to the right, and a white mark on each side gives the VWAP of that half. When the VWAP of the second half is higher, the drop is blue: value moved up during the period. When it is lower, the drop is red. The busiest price of each drop is outlined in gold, heavy drops are more opaque than light ones, and a label under each drop gives its shape and how far its VWAP moved.

This code is written in ProRealCode Script and runs with ProRealCode Studio on ProRealTime Web.

Volume drops indicator on a 1-minute Mini DAX chart, with candles grouped into drops drawn as two half volume profiles and the VWAP of each half

Mini DAX, 1 minute, drops of 10 candles. The rally after 15:36 is a series of blue drops with large VWAP shifts (28 and 23 points). At the top, the drops turn red. In the range that follows, the shifts shrink to 1 or 2 points. The blue “P 23” drop before 17:00 starts the next leg up.

Why a drop instead of a candle

A candle gives four prices: the open, the high, the low and the close. It does not say where the volume traded. Two candles with the same open and close can tell opposite stories: in one, most of the volume traded near the high, in the other near the low. A volume profile shows where the volume went, but a single profile of the whole period does not say when.

The drop keeps both. Its outline is the volume profile of the period, so you see where the market traded. Its two halves show whether that volume moved up or down from the first half of the period to the second. The two VWAPs sum it up in one number: the average price paid by the volume in each half.

The drops are built from the candles of the chart. Each candle spreads its volume evenly over the price rows it covered, so the profile gets finer as the chart’s timeframe gets smaller: 10 candles of 1 minute give a more detailed 10-minute drop than 2 candles of 5 minutes.

1. The drops

A drop is a group of consecutive candles: 10 by default, so on a 1-minute chart each drop covers 10 minutes. Drops are aligned on a fixed grid of candles, so they do not shift when a new candle arrives: the last drop simply fills up. The last 30 drops are drawn (adjustable).

  • The left half: the volume profile of the first half of the candles, drawn more transparent.
  • The right half: the volume profile of the second half, drawn more opaque.
  • The rows: each drop’s range is cut into 14 rows (adjustable). With the “Round the shape” switch on, each row is averaged with its two neighbours, which gives the drops their rounded outline. Turn it off to see the raw profile.
  • The gold outline: the row with the most volume over the whole drop, its point of control.
  • The opacity: the more volume a drop holds compared with the average of the last 100 candles, the more opaque it is. A pale drop is a quiet period.

2. The two VWAPs and the colour

The VWAP of each half is the average of the typical price of its candles, (high + low + close) / 3, weighted by their volume. The two white marks are joined by a vertical line in the middle of the drop, so the step between them reads at a glance.

  • Blue: the second VWAP is above the first. The volume traded higher in the second half: buyers moved value up.
  • Red: the second VWAP is below the first. Value moved down.
  • Grey: the last drop while its second half has not started yet.

A big step is a period where value moved a lot. A small step on a wide drop is a period where the market traded a lot of volume without going anywhere: a balance, often before a breakout.

3. The shape: P, b and D

The label under each drop gives the shape of its profile, followed by the distance between the two VWAPs, in points.

  • P: the busiest row is in the top third of the drop. The volume built at the top of the period, often after a push up, or when sellers caught buyers there.
  • b: the busiest row is in the bottom third. The volume built at the bottom, often after a push down, or at a low where buyers stepped in.
  • D: the busiest row is in the middle. A balanced period.

The shape and the colour read together. A blue “b” drop is volume at the bottom followed by a move up: buyers accepted the low prices, then lifted them. A red “P” drop is the mirror.

Volume drops of 30 candles with 50 rows on a 1-minute Mini DAX chart, next to the settings form

Mini DAX, 1 minute, drops of 30 candles with 50 rows. The climb from 11:00 to 12:00 is a staircase of blue drops with VWAP shifts of 28 and 29 points. The settings form shows the two switches.

The table

  • Drop: the number of candles per drop.
  • Last drop VWAP: up or down, and by how many points.
  • Last drop shape: P, b or D, in words.
  • Last drop volume: its volume compared with the average, 0.7 x meaning 30% below.
  • In a row: how many drops of the same colour in a row, counting back from the last one.

Settings and how to use it

Paste the code into a new Studio tab and run it on an intraday chart of an instrument with volume: index futures such as the Mini DAX or the Nasdaq, or stocks. The chart’s own candles stay visible behind the drops: switch the price to a line, or make the candles thinner, for a cleaner view. Every setting is a field of the Variables form:

  • Drop: chart candles per drop: 10 by default. 10 on a 1-minute chart gives 10-minute drops, 30 on a 5-minute chart gives drops of two and a half hours.
  • Drops shown: 30 by default.
  • Rows per drop: 14 by default. More rows give a finer outline, as in the second capture with 50.
  • Round the shape of the drops: a switch, on by default.
  • Shape and VWAP shift under each drop: a switch, on by default. Turn it off to keep only the drops.

On an instrument without volume, every candle counts as one unit of time. The drops then show the time spent at each price, and the two VWAPs become the average typical price of each half.

Volume drops of 30 candles on a 5-minute Mini Nasdaq 100 chart, with blue and red drops showing the VWAP shift of each period

Mini Nasdaq 100, 5 minutes, drops of 30 candles (two and a half hours). The night sell-off is a red drop whose VWAP fell 105 points. The last drop, in the US session, is red with its volume at the bottom and 2.7 times the average volume.

A typical reading: after a run of blue drops, a drop comes in red with a “P” shape and a heavy volume. Buyers traded a lot at the top and value started to slip. The next drop confirms or not. Each of these is a reason. None of them is a signal on its own.

Under the hood

The code also shows several additions of ProRealCode Script: input() fields with two switches, arrays for the rows of each half, nested loops with BREAK, a three-row smoothing of the profile, DRAWRECTANGLE and DRAWSEGMENT placed between bars, DRAWLABEL with values inserted in the text, and a table with DRAWTABLE, TABLEMERGE and TABLECELL.

// ============================================================================
// Volume Drops
// Candles drawn as two half volume profiles, with the VWAP of each half
// ----------------------------------------------------------------------------
// Author: Nicolas — ProRealCode
// Runs with ProRealCode Studio: https://www.prorealcode.com/prorealcode-studio/
// ----------------------------------------------------------------------------
// The chart's candles are grouped into drops (10 candles of 1 minute make a
// 10-minute drop). Each drop is cut in two: the volume profile of its first
// half is drawn to the left, the profile of its second half to the right. A
// white mark on each side gives the VWAP of that half. When the VWAP of the
// second half is above the first, the drop is blue: value moved up inside the
// drop. When it is below, the drop is red. The busiest price of the drop is
// outlined in gold, and the heavier the drop, the more opaque it is.
// ============================================================================

input(dropBars, 10, "Drop: chart candles per drop", int)
input(drops, 30, "Drops shown", int)
input(rows, 14, "Rows per drop", int)
input(smooth, 1, "Round the shape of the drops", bool)
input(showInfo, 1, "Shape and VWAP shift under each drop", bool)

// ── 1. Volume and typical price of each candle ──────────────────────────────
IF volume > 0 THEN
vol = volume
ELSE
vol = 1
ENDIF
tp = (high + low + close) / 3
avgV = Average[100](vol)

IF islastbarupdate THEN
n = MAX(2, dropBars)
half = FLOOR(n / 2)
maxRows = MAX(2, rows)
w = n / 2 - 0.25
lastId = FLOOR(barindex / n)
streak = 0
streakOn = 1
FOR c = 0 TO drops - 1 DO
cFrom = (lastId - c) * n
IF cFrom < 0 THEN
BREAK
ENDIF
cEnd = MIN(cFrom + n - 1, barindex)

// ── 2. The drop's range, then the volume of each half row by row ─────────
cHi = high[barindex - cFrom]
cLo = low[barindex - cFrom]
FOR bi = cFrom TO cEnd DO
k = barindex - bi
cHi = MAX(cHi, high[k])
cLo = MIN(cLo, low[k])
NEXT
rowH = MAX(ticksize, (cHi - cLo) / maxRows)
nRows = MAX(1, MIN(maxRows, CEIL((cHi - cLo) / rowH)))
FOR r = 0 TO nRows DO
$dl[r] = 0
$dr[r] = 0
NEXT
volL = 0
volR = 0
pvL = 0
pvR = 0
FOR bi = cFrom TO cEnd DO
k = barindex - bi
a0 = MAX(0, MIN(nRows - 1, FLOOR((low[k] - cLo) / rowH)))
a1 = MAX(0, MIN(nRows - 1, FLOOR((high[k] - cLo) / rowH)))
share = vol[k] / (a1 - a0 + 1)
IF bi - cFrom < half THEN
FOR r = a0 TO a1 DO
$dl[r] = $dl[r] + share
NEXT
volL = volL + vol[k]
pvL = pvL + tp[k] * vol[k]
ELSE
FOR r = a0 TO a1 DO
$dr[r] = $dr[r] + share
NEXT
volR = volR + vol[k]
pvR = pvR + tp[k] * vol[k]
ENDIF
NEXT

// The busiest row of the whole drop, then the shape, rounded or raw
pocR = 0
pocV = 0
FOR r = 0 TO nRows - 1 DO
IF $dl[r] + $dr[r] > pocV THEN
pocV = $dl[r] + $dr[r]
pocR = r
ENDIF
NEXT
rowMax = 0
FOR r = 0 TO nRows - 1 DO
IF smooth AND nRows > 2 THEN
rDn = MAX(0, r - 1)
rUp = MIN(nRows - 1, r + 1)
$sl[r] = ($dl[rDn] + 2 * $dl[r] + $dl[rUp]) / 4
$sr[r] = ($dr[rDn] + 2 * $dr[r] + $dr[rUp]) / 4
ELSE
$sl[r] = $dl[r]
$sr[r] = $dr[r]
ENDIF
rowMax = MAX(rowMax, MAX($sl[r], $sr[r]))
NEXT

// ── 3. The VWAP of each half gives the drop its colour ───────────────────
done = volL > 0 AND volR > 0
vwL = cLo
vwR = cLo
IF volL > 0 THEN
vwL = pvL / volL
ENDIF
IF volR > 0 THEN
vwR = pvR / volR
ENDIF
up = vwR >= vwL
IF done = 0 THEN
cr = 150
cg = 160
cb = 185
ELSIF up THEN
cr = 70
cg = 160
cb = 255
ELSE
cr = 240
cg = 90
cb = 100
ENDIF
// A heavy drop is more opaque than a light one
rel = 1
IF avgV > 0 THEN
rel = (volL + volR) / (avgV * (cEnd - cFrom + 1))
ENDIF
a = 80 + 110 * MIN(1.5, rel) / 1.5

// ── 4. The drop: first half to the left, second half to the right ────────
xC = cFrom + (n - 1) / 2
IF rowMax > 0 THEN
FOR r = 0 TO nRows - 1 DO
yLo = cLo + r * rowH
lenL = $sl[r] / rowMax * w
lenR = $sr[r] / rowMax * w
IF r = pocR THEN
IF lenL > 0 THEN
DRAWRECTANGLE(xC - lenL, yLo, xC, yLo + rowH) FILLCOLOR(cr, cg, cb, a * 0.6) COLOURED(250, 220, 80)
ENDIF
IF lenR > 0 THEN
DRAWRECTANGLE(xC, yLo, xC + lenR, yLo + rowH) FILLCOLOR(cr, cg, cb, a) COLOURED(250, 220, 80)
ENDIF
ELSE
IF lenL > 0 THEN
DRAWRECTANGLE(xC - lenL, yLo, xC, yLo + rowH) FILLCOLOR(cr, cg, cb, a * 0.6) COLOURED(cr, cg, cb, 0)
ENDIF
IF lenR > 0 THEN
DRAWRECTANGLE(xC, yLo, xC + lenR, yLo + rowH) FILLCOLOR(cr, cg, cb, a) COLOURED(cr, cg, cb, 0)
ENDIF
ENDIF
NEXT
ENDIF
DRAWSEGMENT(xC, cLo, xC, cHi) COLOURED(cr, cg, cb, 160) STYLE(line, 1)
IF volL > 0 THEN
DRAWSEGMENT(xC - w, vwL, xC, vwL) COLOURED(240, 244, 252) STYLE(line, 2)
ENDIF
IF volR > 0 THEN
DRAWSEGMENT(xC, vwR, xC + w, vwR) COLOURED(240, 244, 252) STYLE(line, 2)
ENDIF
IF done THEN
DRAWSEGMENT(xC, vwL, xC, vwR) COLOURED(240, 244, 252) STYLE(line, 2)
ENDIF

// ── 5. Under the drop: its shape and how far the VWAP moved ──────────────
// P: the volume sits at the top. b: at the bottom. D: in the middle.
place = (pocR + 0.5) / nRows
sTxt = ROUND(ABS(vwR - vwL) / ticksize) * ticksize
IF showInfo AND done THEN
IF place > 0.66 THEN
DRAWLABEL(xC, cLo, "P #sTxt#", arrowup, small) COLOURED(cr, cg, cb) FILLCOLOR(14, 18, 30, 170) BORDERCOLOR(cr, cg, cb, 0)
ELSIF place < 0.34 THEN
DRAWLABEL(xC, cLo, "b #sTxt#", arrowup, small) COLOURED(cr, cg, cb) FILLCOLOR(14, 18, 30, 170) BORDERCOLOR(cr, cg, cb, 0)
ELSE
DRAWLABEL(xC, cLo, "D #sTxt#", arrowup, small) COLOURED(cr, cg, cb) FILLCOLOR(14, 18, 30, 170) BORDERCOLOR(cr, cg, cb, 0)
ENDIF
ENDIF

// The last drop feeds the table; the streak counts drops of the same colour
IF c = 0 THEN
lastDone = done
lastUp = up
lastShift = sTxt
lastPlace = place
lastRel = ROUND(rel * 10) / 10
ENDIF
IF streakOn AND done AND (streak = 0 OR up = streakUp) THEN
streak = streak + 1
streakUp = up
ELSIF done THEN
streakOn = 0
ENDIF
NEXT

// ── 6. The table ───────────────────────────────────────────────────────────
board = DRAWTABLE(6, 2, topleft) FILLCOLOR(14, 18, 30, 235) BORDERCOLOR(50, 60, 90)
TABLEMERGE(board, 0, 0, 1, 2)
TABLECELL(board, 0, 0, "Volume drops", bold, center, 14) COLOURED(220, 228, 245)
TABLECELL(board, 1, 0, "Drop") COLOURED(150, 165, 195)
TABLECELL(board, 1, 1, "#n# candles", right) COLOURED(220, 228, 245)
TABLECELL(board, 2, 0, "Last drop VWAP") COLOURED(150, 165, 195)
IF lastDone = 0 THEN
TABLECELL(board, 2, 1, "first half", right) COLOURED(150, 165, 195)
ELSIF lastUp THEN
TABLECELL(board, 2, 1, "up #lastShift#", bold, right) COLOURED(70, 160, 255)
ELSE
TABLECELL(board, 2, 1, "down #lastShift#", bold, right) COLOURED(240, 90, 100)
ENDIF
TABLECELL(board, 3, 0, "Last drop shape") COLOURED(150, 165, 195)
IF lastPlace > 0.66 THEN
TABLECELL(board, 3, 1, "P · volume at the top", right) COLOURED(220, 228, 245)
ELSIF lastPlace < 0.34 THEN
TABLECELL(board, 3, 1, "b · volume at the bottom", right) COLOURED(220, 228, 245)
ELSE
TABLECELL(board, 3, 1, "D · volume in the middle", right) COLOURED(220, 228, 245)
ENDIF
TABLECELL(board, 4, 0, "Last drop volume") COLOURED(150, 165, 195)
TABLECELL(board, 4, 1, "#lastRel# x average", right) COLOURED(220, 228, 245)
TABLECELL(board, 5, 0, "In a row") COLOURED(150, 165, 195)
IF streak = 0 THEN
TABLECELL(board, 5, 1, "none yet", right) COLOURED(150, 165, 195)
ELSIF streakUp THEN
TABLECELL(board, 5, 1, "#streak# blue drops", bold, right) COLOURED(70, 160, 255)
ELSE
TABLECELL(board, 5, 1, "#streak# red drops", bold, right) COLOURED(240, 90, 100)
ENDIF
ENDIF

RETURN
No ITF file for this code
A Studio Only code is not imported into ProRealTime™. Copy it and paste it into the ProRealCode Studio editor.
Nicolas
Nicolas Legend
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

ProRealCode ProRealCode
Loading...