Skip to main content

Interface: VolumeProfileOptions

Charting Library.VolumeProfileOptions

Properties​

history_sessions​

Optional

history_sessions: number

How many trading sessions of history Session Volume Profile should cover. Only Session Volume Profile reads this; the fixed and visible range indicators define their own range.

By default the indicator draws only over the range the chart itself has loaded, so profiles stop where the chart's history stops. Setting this adds an initial minimum-history request intended to cover that many sessions, extending the chart's own history to fit them. It is a prefetch hint, not a cap on the most recent sessions; normal chart scroll-back remains available.

Requires the studies_extend_time_scale featureset; without it the option has no effect. Because the time scale is shared, extending it affects every source on the chart, not only this indicator. Values below 1 are ignored and anything above 500 is clamped. As best-effort protection against amplified initial requests, this option contributes at most 200,000 bars to the minimum countBack of each affected main or detailed series. This does not cap the total bars fetched or cached: the history processor may request more bars to span from the first loaded bar to the current time. Therefore high-frequency data may cover fewer than the requested sessions. Tick resolutions always use the 200,000-bar contribution because a session duration cannot predict how many ticks it contains.


max_total_rows​

Optional

max_total_rows: number

Maximum number of histogram rows a volume profile indicator keeps in total, across all of the profiles it has drawn. It applies to every volume profile indicator — Session Volume Profile, Volume Profile Fixed Range, and Volume Profile Visible Range. For a multi-profile indicator, once new profiles would push the total past this limit, the oldest profiles are dropped, which is what bounds how far back it draws. A single-profile indicator whose one histogram would exceed the limit reports an error instead.

Raising this number lets profiles cover more history at the cost of memory and of time spent serializing and laying out the extra rows, so increase it gradually and measure. Values below 100 are ignored.

6000