1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
40 lines of Pine Script v6 from public/indicators/vpvr.pine, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.
vpvr.pine
//@version=6
indicator("Volume Profile (Simulated)", overlay=true, max_lines_count=500)
// Parameters
rows = 50
lookback = 200 // Number of bars to analyze
// Calculate Volume Profile
if barstate.islast
float max_vol = 0.0
float highest_high = high
float lowest_low = low
// Find highest high and lowest low over the lookback period
for i = 0 to lookback - 1
highest_high := math.max(highest_high, high[i])
lowest_low := math.min(lowest_low, low[i])
// Initialize volume array
float[] vol_array = array.new_float(rows, 0.0)
float price_step = (highest_high - lowest_low) / rows
// Distribute volume into bins
for i = 0 to lookback - 1
int bin = math.floor((close[i] - lowest_low) / price_step)
if bin >= 0 and bin < rows
float current_vol = array.get(vol_array, bin)
float new_vol = current_vol + volume[i]
array.set(vol_array, bin, new_vol)
max_vol := math.max(max_vol, new_vol)
// Draw the profile
for i = 0 to rows - 1
float vol = array.get(vol_array, i)
if vol > 0
float width = (vol / max_vol) * 100 // Scale width
// Calculate bar coordinates
price_level = lowest_low + (i * price_step)
// Draw horizontal line representing the volume bar
line.new(x1=bar_index, y1=price_level, x2=bar_index - int(width), y2=price_level, color=color.new(color.blue, 50), width=4)
Overview
On the last bar it finds the highest high and lowest low across the previous 200 bars, splits that range into 50 price bins, and adds each bar's volume to the bin of its close. It draws a horizontal line at each occupied price level, with length scaled to that bin's share of the largest bin. Rows, lookback, and colors are fixed in the code, and there are no trading signals or alerts.
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur
The MGIC-tracker is a TradingView indicator that overlays ARK Invest trade records onto stock price charts. It plots buy and sell labels at the exact timestamp of each transaction, showing share volume and ETF weight. Users select a specific ETF type via setti
This overlay indicator marks call and put setups from EMAs, RSI, MACD, and a SPY volume ratio. A call needs higher highs, RSI above its minimum, rising MACD, above-average proxy volume, and a rising trend EMA; a put reverses those tests. Early markers use an E
Comprehensive Volume Profile is an overlay indicator that calculates and plots volume distribution across specified time ranges such as daily sessions, weekly, monthly, or custom bar lengths. It identifies key structural price levels including the Point of Con
This indicator plots two Hull moving averages on the price chart, one of the selected price and one of close, and optionally smooths both with a Kahlman filter. It fills the space between them and marks buy and sell labels when they cross, provided scaled volu
This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow