Horizontal Volume
"Horizontal Volume" by alexgrover, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: Horizontal Volume (v2.0), read 2026-10-12T15:55:26.070Z; source language v4.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
Horizontal Volume by alexgrover, ported from Pine v4. Overlay indicator with drawings and 4 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © alexgrover
// ------------------------------------------------------------------------------------------------
// Original author: alexgrover
// Original title: Horizontal Volume
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 4
// 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
// Converted by the FloScript converter from a Pine-compatible v4 source.
indicator("Horizontal Volume", overlay=true)
length = input.int(54, maxval=54)
src = input(close)
pos = input.string("Lowest", "Relative Positon", options=["Lowest", "Highest", "Moving Average"])
uni = input(false, "Unicolor")
//------------------------------------------------------------------------------
v = volume
n = bar_index
//----
ma = ta.sma(src, length)
mav = ta.sma(v, length)
//----
hp = ta.highest(src, length)
lp = ta.lowest(src, length)
rp = hp - lp
//----
hv = ta.highest(v, length)
lv = ta.lowest(v, length)
rv = hv - lv
//------------------------------------------------------------------------------
grad(os) =>
os < 10 ? #ff1100 : math.max(os, 10) < 20 ? #d12033 : math.max(os, 20) < 30 ? #bd2649 : math.max(os, 30) < 40 ? #a72d61 : math.max(os, 40) < 50 ? #913479 : math.max(os, 50) < 60 ? #743d99 : math.max(os, 60) < 70 ? #5945b6 : math.max(os, 70) < 80 ? #494ac7 : math.max(os, 80) < 90 ? #3750db : #2157f3
//------------------------------------------------------------------------------
line l = na
A = pos == "Lowest" ? lp : pos == "Highest" ? hp : ma
B = pos == "Moving Average" ? mav : lv
sign = pos == "Highest" ? -1 : 1
if not na(volume)
for i = 0 to 53
css = i > length - 1 ? na : uni ? #2157f3 : grad((v[i] - lv) / rv * 100)
os = (v[i] - B) * sign
k = A + os / rv * rp
l := line.new(n[i], A, n[i], k, color=css, width=2)
line.delete(l[1])
//------------------------------------------------------------------------------
// ]*ΦωΦ)ノ You found me!
//(ΦωΦ)Life is harsh as a neko emoji, so I had to hide in user scripts
// I am looking for a new place, if you post a script try including meヾ(*ΦωΦ)ノ
This file is under the Mozilla Public License 2.0; it is a port of the original by alexgrover, 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.