OPEN-SOURCE SCRIPT
Unusual Volume

//version=5
indicator("Unusual Volume", overlay=false)
// --- Inputs ---
len = input.int(20, "Average Volume Length", minval=1)
mult = input.float(2.0, "Unusual Volume Multiplier", step=0.1)
// --- Calculations ---
avgVol = ta.sma(volume, len)
ratio = volume / avgVol
isBigVol = ratio > mult
// --- Plots ---
plot(volume, "Volume", style=plot.style_columns,
color = isBigVol ? color.new(color.green, 0) : color.new(color.gray, 60))
plot(avgVol, "Average Volume", color=color.orange)
// Mark unusual volume bars
plotshape(isBigVol, title="Unusual Volume Marker",
location=location.bottom, style=shape.triangleup,
color=color.green, size=size.tiny, text="UV")
// Optional: show ratio in Data Window
var label ratioLabel = na
indicator("Unusual Volume", overlay=false)
// --- Inputs ---
len = input.int(20, "Average Volume Length", minval=1)
mult = input.float(2.0, "Unusual Volume Multiplier", step=0.1)
// --- Calculations ---
avgVol = ta.sma(volume, len)
ratio = volume / avgVol
isBigVol = ratio > mult
// --- Plots ---
plot(volume, "Volume", style=plot.style_columns,
color = isBigVol ? color.new(color.green, 0) : color.new(color.gray, 60))
plot(avgVol, "Average Volume", color=color.orange)
// Mark unusual volume bars
plotshape(isBigVol, title="Unusual Volume Marker",
location=location.bottom, style=shape.triangleup,
color=color.green, size=size.tiny, text="UV")
// Optional: show ratio in Data Window
var label ratioLabel = na
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.