Skip to content
EliteChart

computeVolumeProfile

Documentation


Documentation / @elitechart/drawings / computeVolumeProfile

code
function computeVolumeProfile(
   bars, 
   fromTime, 
   toTime, 
   bins): readonly VolumeBucket[];

Defined in: drawings/src/fixed-range-volume-profile.ts:39

Bin the volume of every bar in [fromTime, toTime] into bins price buckets between the range's min/max of low and high. Each bar's volume is distributed evenly across every bucket its range overlaps.

Parameters

bars

readonly Bar[]

fromTime

number

toTime

number

bins

number

Returns

readonly VolumeBucket[]