Skip to content

charton API


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

Function: regressionChannel() ​

regressionChannel(bars, start?, end?): RegressionChannel | null

Defined in: packages/core/src/drawing/bar-studies.ts:151

Linear regression of the closes of bars [start, end) against their offset from bar start. Null when no bar there has a finite close.

Parameters ​

bars ​

readonly Bar[]

start? ​

number = 0

end? ​

number = bars.length

Returns ​

RegressionChannel | null