PitchKit
API Reference@pitchkit/coreFunctions

unevenBarWidths()

function unevenBarWidths(periods, ratio?): number[] | undefined;

Defined in: packages/core/src/momentum/bars.ts:131

The median bar width of each non-empty period, when any two differ by more than ratio (widest over narrowest); undefined when they are even or there is only one period to compare.

Parameters

ParameterTypeDefault value
periodsreadonly readonly MomentumBar[][]undefined
rationumber1.25

Returns

number[] | undefined

On this page