Volume Profile

Volume profile shows where volume traded. Why does that matter? Areas of high volume are ‘sticky’. These are prices of consensus.

Imagine hundreds of people buy and sell concert tickets for $100, but almost nobody is willing to sell for $90 or buy for $110. The market has reached a consensus that the tickets are worth around $100.

If price moves away from areas of high volume, the movement of the price is likely to be more erratic. Less consensus.

Volume Profile Properties

  • Point of Control (POC) - the price with the highest traded volume.
  • Value Area - the range containing approximately 70% of the traded volume.
  • Value Area High (VAH) - the upper boundary of the Value Area.
  • Value Area Low (VAL) - the lower boundary of the Value Area.
Volume profile anchored to the right of the chart showing the Point of Control, Value Area High, and Value Area Low

Example Strategies

Trading a Reversion

In the chart above, price briefly moves below the Value Area Low (VAL) before returning to the Value Area. This suggests the market rejected lower prices.

Some traders look for an opportunity to trade back toward the Point of Control (POC), where the highest amount of trading previously occurred. A common place to exit the trade is near the POC, while a move back below the VAL may invalidate the setup.

Trading a Breakout

Unlike the previous example, price does not return to the previous Value Area. Instead, it establishes a new area of value at lower prices, shown by each session's Volume Profile shifting downward.

Some traders interpret this as a sign that the market is accepting lower prices. Rather than expecting a reversion toward the previous Point of Control, they look for opportunities to trade in the direction of the new trend.

Session volume profiles shifting downward as price accepts lower prices in a breakout

Build your own Volume Profile

The Volume Profile - 40 indicator in the Indicators panel is a short script. It:

  • Splits the chart into fixed blocks of candles. A candle's block comes from its own time, so the blocks stay put as the replay plays and as earlier history loads, on time intervals and tick intervals alike.
  • Builds a volume profile for each block with volumeByPrice(), in rows as tall as the chart's (chart.rowSize), so the profile lines up with a condensed footprint.
  • Finds the highest traded volume across all blocks.
  • Draws each profile against that value, so blocks compare directly.
  • Draws a box showing the price range of each block.

Period (candles per block) and Profile width are inputs, so you change them from the chart header's Settings button without opening the code. For which Period to use on NQ, ES, GC and 6E, see Volume Profile Settings for Futures.

// Range boxes - 40-candle blocks, each with a high/low box and a volume profile.
// https://marketbyorder.com/docs/api

const BLOCK_CANDLES = input.number("Period", 40, { min: 5, max: 500, step: 5 })
const PROFILE_PCT = input.number("Profile width", 0.4, { min: 0.1, max: 1, step: 0.05 })   // longest bar, as a share of the block's width

type Candle = (typeof candles)[number]

const blocks: {
  candles: Candle[]
  even: boolean
  profile: { price: number; buys: number; sells: number }[]
}[] = []
let maxTotal = 0

const blockNumber = (candle: Candle) => Math.floor(Math.floor(candle.time / candle.interval) / BLOCK_CANDLES)

const groups: { number: number; candles: Candle[] }[] = []
for (const candle of candles) {
  const number = blockNumber(candle)
  const last = groups[groups.length - 1]
  if (last && last.number === number) last.candles.push(candle)
  else groups.push({ number, candles: [candle] })
}

for (const group of groups) {
  const profile = volumeByPrice(group.candles, chart.rowSize)
  if (profile.length === 0) continue

  for (const row of profile) {
    maxTotal = Math.max(maxTotal, row.buys + row.sells)
  }
  blocks.push({ candles: group.candles, even: group.number % 2 === 0, profile })
}

const timeAfterCandles = (block: Candle[], count: number) => {
  const index = Math.min(Math.floor(count), block.length - 1)
  const candle = block[index]
  return candle.startMs + (count - index) * (candle.endMs - candle.startMs)
}

if (maxTotal > 0) {
  for (const { candles: block, even, profile } of blocks) {
    const first = block[0]
    const last = block[block.length - 1]
    const barTime = (share: number) =>
      timeAfterCandles(block, share * PROFILE_PCT * block.length) - first.startMs

    const lo = profile[0].price
    const hi = profile[profile.length - 1].price
    if (hi > lo) {
      chart.box({
        time1: first.startMs,
        price1: hi,
        time2: last.startMs,
        price2: lo,
        color: even ? "rgba(59, 130, 246, 0.08)" : "rgba(148, 163, 184, 0.08)",
        borderColor: "rgba(148, 163, 184, 0.3)",
      })
    }

    for (const row of profile) {
      const total = row.buys + row.sells
      const onPress = { text: `Buys: ${row.buys}
Sells: ${row.sells}` }
      chart.horizontalBar({
        price: row.price,
        widthTime: barTime(total / maxTotal),
        time: first.startMs,
        anchor: "time",
        align: "right",
        color: "rgba(239, 68, 68, 0.65)",
        onPress,
      })
      chart.horizontalBar({
        price: row.price,
        widthTime: barTime(row.buys / maxTotal),
        time: first.startMs,
        anchor: "time",
        align: "right",
        color: "rgba(59, 130, 246, 0.9)",
        onPress,
      })
    }
  }
}

Each price level draws two bars with chart.horizontalBar: a red bar for total volume and a blue bar for buys on top of it. The onPress text shows the buys and sells behind a bar's width when it is clicked. Since volumeByPrice() returns rows sorted by price, each block's high and low are the first and last row.