Lowry Upside % Volume
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BullRiderCapital

//@version=4
study(title = "Lowry Upside % Volume", shorttitle="Upside % Vol", precision=2)
sym(s) => security(s, "D", close)

// Calculation
// Get total volume or the sum of Upside Volume and Downside Volume
// Divide Upside Volume by total volume to get Upside % Volume
divide = (sym("USI:UPVOL.NY")) / (sym("USI:TVOL.NY"))

barColor = divide >= .90 ? #7CFC00 : divide >= .80 ? #7FFFD4 : divide <= .10 ? #FF0000 : #194859
plot(divide, "Lowry Vol Alert", barColor, style=plot.style_columns)
