Cumulative Volume Difference Map
"Cumulative Volume Difference Map" by RicardoSantos, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: Cumulative Volume Difference Map (v1.0), read 2026-10-12T16:15:30.213Z; source language v5.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
Cumulative Volume Difference Map by RicardoSantos, ported from Pine v5. Pane indicator with 39 plots.
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © RicardoSantos
// ------------------------------------------------------------------------------------------------
// Original author: RicardoSantos
// Original title: Cumulative Volume Difference Map
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 5
// Fetched: 2026-10-12
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
indicator("Cumulative Volume Difference Map")
float pv = ta.cum(close > close[1] ? volume : 0)
float nv = ta.cum(close < close[1] ? volume : 0)
float r = (pv - nv) / (pv + nv)
func(src, length) =>
src > src[length]
bool h00 = func(r, 01)
bool h10 = func(r, 060)
bool h20 = func(r, 300)
bool h30 = func(r, 700)
bool h01 = func(r, 02)
bool h11 = func(r, 080)
bool h21 = func(r, 340)
bool h31 = func(r, 750)
bool h02 = func(r, 04)
bool h12 = func(r, 100)
bool h22 = func(r, 380)
bool h32 = func(r, 800)
bool h03 = func(r, 08)
bool h13 = func(r, 120)
bool h23 = func(r, 420)
bool h33 = func(r, 850)
bool h04 = func(r, 14)
bool h14 = func(r, 140)
bool h24 = func(r, 460)
bool h34 = func(r, 900)
bool h05 = func(r, 20)
bool h15 = func(r, 160)
bool h25 = func(r, 500)
bool h35 = func(r, 950)
bool h06 = func(r, 28)
bool h16 = func(r, 180)
bool h26 = func(r, 540)
bool h36 = func(r, 1000)
bool h07 = func(r, 36)
bool h17 = func(r, 210)
bool h27 = func(r, 580)
bool h37 = func(r, 1100)
bool h08 = func(r, 44)
bool h18 = func(r, 240)
bool h28 = func(r, 620)
bool h38 = func(r, 1200)
bool h09 = func(r, 56)
bool h19 = func(r, 270)
bool h29 = func(r, 660)
bool h39 = func(r, 1400)
plot(h01 ? 01 : na, '', color.silver, 3, plot.style_linebr)
plot(h02 ? 02 : na, '', color.silver, 3, plot.style_linebr)
plot(h03 ? 03 : na, '', color.silver, 3, plot.style_linebr)
plot(h04 ? 04 : na, '', color.silver, 3, plot.style_linebr)
plot(h05 ? 05 : na, '', color.silver, 3, plot.style_linebr)
plot(h06 ? 06 : na, '', color.silver, 3, plot.style_linebr)
plot(h07 ? 07 : na, '', color.silver, 3, plot.style_linebr)
plot(h08 ? 08 : na, '', color.silver, 3, plot.style_linebr)
plot(h09 ? 09 : na, '', color.silver, 3, plot.style_linebr)
plot(h10 ? 10 : na, '', color.silver, 3, plot.style_linebr)
plot(h11 ? 11 : na, '', color.silver, 3, plot.style_linebr)
plot(h12 ? 12 : na, '', color.silver, 3, plot.style_linebr)
plot(h13 ? 13 : na, '', color.silver, 3, plot.style_linebr)
plot(h14 ? 14 : na, '', color.silver, 3, plot.style_linebr)
plot(h15 ? 15 : na, '', color.silver, 3, plot.style_linebr)
plot(h16 ? 16 : na, '', color.silver, 3, plot.style_linebr)
plot(h17 ? 17 : na, '', color.silver, 3, plot.style_linebr)
plot(h18 ? 18 : na, '', color.silver, 3, plot.style_linebr)
plot(h19 ? 19 : na, '', color.silver, 3, plot.style_linebr)
plot(h20 ? 20 : na, '', color.silver, 3, plot.style_linebr)
plot(h21 ? 21 : na, '', color.silver, 3, plot.style_linebr)
plot(h22 ? 22 : na, '', color.silver, 3, plot.style_linebr)
plot(h23 ? 23 : na, '', color.silver, 3, plot.style_linebr)
plot(h24 ? 24 : na, '', color.silver, 3, plot.style_linebr)
plot(h25 ? 25 : na, '', color.silver, 3, plot.style_linebr)
plot(h26 ? 26 : na, '', color.silver, 3, plot.style_linebr)
plot(h27 ? 27 : na, '', color.silver, 3, plot.style_linebr)
plot(h28 ? 28 : na, '', color.silver, 3, plot.style_linebr)
plot(h29 ? 29 : na, '', color.silver, 3, plot.style_linebr)
plot(h30 ? 30 : na, '', color.silver, 3, plot.style_linebr)
plot(h31 ? 31 : na, '', color.silver, 3, plot.style_linebr)
plot(h32 ? 32 : na, '', color.silver, 3, plot.style_linebr)
plot(h33 ? 33 : na, '', color.silver, 3, plot.style_linebr)
plot(h34 ? 34 : na, '', color.silver, 3, plot.style_linebr)
plot(h35 ? 35 : na, '', color.silver, 3, plot.style_linebr)
plot(h36 ? 36 : na, '', color.silver, 3, plot.style_linebr)
plot(h37 ? 37 : na, '', color.silver, 3, plot.style_linebr)
plot(h38 ? 38 : na, '', color.silver, 3, plot.style_linebr)
plot(h39 ? 39 : na, '', color.silver, 3, plot.style_linebr)
This file is under the Mozilla Public License 2.0; it is a port of the original by RicardoSantos, with the original licence header kept and the changes made for FloScript noted in the file.
- v2
Library refresh 2026-10-14
- v1
Library refresh 2026-10-12
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.