Advanced volume distribution analysis indicator
The Volume Profile indicator is a powerful tool for analyzing the distribution of trading volume across different price levels over a specified time period. Unlike traditional volume indicators that display volume over time, Volume Profile shows volume at specific price levels, revealing areas of high and low trading activity.
This information is invaluable for identifying key support and resistance levels, as areas with high volume often act as significant price levels where the market may pause, reverse, or consolidate.
High volume nodes typically act as strong support or resistance levels. When price approaches these areas, expect increased trading activity.
The value area represents fair price. Prices outside this range may indicate overextension and potential reversal opportunities.
Low volume nodes often get filled quickly as price moves through them with minimal resistance.
//@version=5
indicator("Volume Profile", overlay=true)
// Input parameters
length = input.int(100, "Period", minval=10)
rows = input.int(24, "Number of Rows", minval=10, maxval=100)
// Calculate price range
highestPrice = ta.highest(high, length)
lowestPrice = ta.lowest(low, length)
priceRange = highestPrice - lowestPrice
rowHeight = priceRange / rows
// Volume distribution calculation
var volumeProfile = array.new_float(rows, 0)
if bar_index >= length
array.fill(volumeProfile, 0)
for i = 0 to length - 1
priceLevel = (close[i] - lowestPrice) / rowHeight
row = math.floor(priceLevel)
if row >= 0 and row < rows
currentVol = array.get(volumeProfile, row)
array.set(volumeProfile, row, currentVol + volume[i])
// Find Point of Control (POC)
pocIndex = 0
maxVolume = 0.0
for i = 0 to rows - 1
vol = array.get(volumeProfile, i)
if vol > maxVolume
maxVolume := vol
pocIndex := i
pocPrice = lowestPrice + (pocIndex * rowHeight)
// Plot POC
plot(pocPrice, "POC", color=color.yellow, linewidth=2)
Language: Pine Script v5
License: MIT - Free to use and modify
Number of bars to analyze for volume distribution.
Number of price levels to divide the volume profile into.
Percentage of total volume to include in value area calculation.
Excellent indicator! The POC levels are incredibly accurate and have significantly improved my entry points. The value area visualization helps me understand market structure much better.
Great tool for day trading. Would love to see an option to customize colors and maybe add alert functionality when price crosses POC.
Perfect for swing trading. The HVN and LVN identification is spot on. I combine this with my other indicators and the results have been fantastic.