Skip to content

charton API


charton API / @chart-on/core / index / adjustBars

Function: adjustBars() ​

adjustBars(bars, adjustments, mode): Bar[]

Defined in: packages/core/src/data/adjust.ts:46

bars back-adjusted for adjustments under mode: each bar's prices are multiplied by the product of the factors of the adjustments after it, and its volume divided by the product of the split factors after it. Returns bars itself when nothing applies, so a source without adjustments costs nothing.

Parameters ​

bars ​

Bar[]

adjustments ​

readonly Adjustment[]

mode ​

AdjustmentMode

Returns ​

Bar[]