The VolumeProfile generator visualizes the distribution of trading volume across price levels using heat maps. It aggregates OHLC data at multiple intervals to create a detailed volume-at-price profile, helping traders identify areas of high and low liquidity.
Use a Controller object to add the generator to a chart:
const volumeProfile = controller.addGenerator('VolumeProfile');
The generator provides extensive configuration organized into groups.
Type: enum
Default: 'fullscreen'
Values: 'fullscreen' | 'fixedInterval' | 'freePlacement'
Details
'fullscreen': A single heat map covers the entire visible chart area.'fixedInterval': Heat maps are created at regular intervals (yearly, monthly, weekly, daily, etc.).'freePlacement': Heat maps can be placed manually at custom positions.Type: enum
Default: 'monthly'
Values: 'yearly' | 'monthly' | 'weekly' | 'daily' | 'fourhourly' | 'hourly' | 'halfhourly' | 'fifteenminutely' | 'fiveminutely' | 'minutely'
Details
Determines the time period each heat map covers in fixedInterval mode. Available values are filtered dynamically - only intervals larger than the chart's current candle interval are offered.
Type: boolean
Default: false
Details
When enabled in fixedInterval mode, all available heat maps are displayed. When disabled, only the number specified by numMaps is shown.
Type: integer
Range: >0
Details
The number of heat maps to display in fixedInterval mode. Only used when displayMaxMaps is disabled.
Type: button
Details
Buttons to add or remove heat maps in freePlacement mode.
Type: enum
Default: 'count'
Values: 'count' | 'priceSpan' | 'percentage'
Details
Controls how the height of each volume bar is determined:
'count': A fixed number of bars across the price range.'priceSpan': Each bar covers a fixed price range.'percentage': Each bar covers a percentage of the total price range.integer15010 - 1000'count' mode.float10>0'priceSpan' mode.float50 - 50'percentage' mode.enum'right''left' | 'right'Type: enum
Default: 'show'
Values: 'show' | 'hide' | 'only'
Details
Controls the display of the Point of Control (highest volume price level).
'show': The POC line is drawn alongside the volume bars.'hide': The POC line is hidden.'only': Only the POC line is drawn, without volume bars.booleaninteger701 - 99booleanType: integer
Default: 20
Range: 1 - 100
Details
The width of the heat map as a percentage of the chart area. Used in fullscreen mode.
Type: integer
Default: 70
Range: 1 - 100
Details
The width of the heat map as a percentage of the chart area. Used in fixedInterval and freePlacement modes.
Type: integer
Default: 80
Range: 1 - 100
Details
The opacity of the volume bars, expressed as a percentage.
booleanbooleanbooleanbooleancolorcolorcolorcolorIn fixedInterval mode, the following intervals are available:
The generator fetches OHLC data at multiple resolutions and aggregates them into volume-at-price histograms. It uses a layered buffer system where finer intervals provide more detail and coarser intervals fill gaps.
The aggregation algorithm:
Heat maps update dynamically as new data arrives (and as the chart is scrolled when using fullscreen mode).
The generator has a built-in permission check, which is called in its onStart method. It calls the provided checkPermission method (via Controller) with the key VolumeProfile.