High/Low Volume
"High/Low Volume" by QuantNomad, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: High/Low Volume (v1.0), read 2026-11-15T18:50:48.460Z; 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.
High/Low Volume by QuantNomad, ported from Pine v5. Pane indicator with 3 plots, 1 fill, alerts and 5 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// (Notice added by FloSignals: the author's source carries none. It was published open-source on 2023-01-21; since 2019-07-26 the platform it was published on has released such a script under MPL-2.0 automatically.)
// ------------------------------------------------------------------------------------------------
// Original author: QuantNomad
// Original title: High/Low Volume
// Licence: MPL-2.0 (the notice above was added by FloSignals; the original carries none)
// Pine version: 5
// Fetched: 2026-11-15
// 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(title="High/Low Volume", shorttitle="HL-Vol", format=format.volume)
////////////
// INPUTS //
type = input.string("Percentile", title="Type", options=["Percentile", "Sigma"])
length = input(200, 'Lookback Period')
plow = input(5, 'Percentile low:', group="Percentile")
phigh = input(95, 'Percentile high:', group="Percentile")
sigmas = input(2, 'Sigmas', group="Sigmas")
//////////////////
// CALCULATIONS //
perc_high = ta.percentile_linear_interpolation(volume, length, phigh)
perc_low = ta.percentile_linear_interpolation(volume, length, plow)
sigma_high = ta.sma(volume, length) + sigmas * ta.stdev(volume, length)
sigma_low = ta.sma(volume, length) - sigmas * ta.stdev(volume, length)
vol_low_level = type == 'Percentile' ? perc_low : sigma_low
vol_high_level = type == 'Percentile' ? perc_high : sigma_high
vol_is_high = volume > vol_high_level
vol_is_low = volume < vol_low_level
////////////
/// PLOTS //
palette = vol_is_high ? color.green : vol_is_low ? color.red : color.gray
plot(volume, color=color.new(palette, 30), style=plot.style_columns, title="Volume")
l1 = plot(vol_high_level, color=color.new(color.green, 65), title="High Volume Level")
l2 = plot(vol_low_level, color=color.new(color.red, 65), title="Low Volume Level")
fill(l1, l2, color.new(color.blue, 75))
////////////
// ALERTS //
if vol_is_high
alert("Volume is Too High!")
if vol_is_low
alert("Volume is Too Low!")
This file is under the Mozilla Public License 2.0; it is a port of the original by QuantNomad, with the original licence header kept and the changes made for FloScript noted in the file.
- v1
Library refresh 2026-11-15
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.