Skip to content
All library documents

Price-Clustered Volume Profiles with K-Means

Article TradingView scripts

Summary

This indicator applies K-means clustering to recent bar midpoint prices, using traded volume to weight cluster centroids. For each resulting price group, it builds a separate volume profile by distributing each bar’s volume across price bins according to the overlap of the bar’s high-low range. It marks the highest-volume bin as that cluster’s point of control (POC), and displays cluster colors, price dots, volume labels, and dashed POC levels.

The accompanying description suggests using cluster POCs and boundaries to frame possible support, resistance, entries, stops, and targets, and reading cluster overlap as a clue to market regime. These are proposed interpretations, not demonstrated predictive results. The calculation uses a selected lookback and initialized centroids, so the grouping depends on parameter choices and recent data. Volume is apportioned across each bar’s range rather than measured at individual traded prices, which makes the displayed profile an approximation.

Key ideas

  • K-means groups recent prices by proximity, while volume-weighted updates set cluster centroids.
  • Each cluster receives its own binned volume profile and point of control.
  • The POC and cluster range are presented as possible levels for trade planning.
  • Cluster overlap or separation is offered as a visual clue to market conditions.
  • The profile approximates volume distribution across bar ranges and does not establish predictive value.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.