Skip to content

charton API


charton API / @chart-on/ta / correlation

Function: correlation() ​

correlation(x, y, length, out?): Float64Array

Defined in: volatility.ts:100

Pearson correlation of x and y over the last length bars, from -1 to 1. NaN when either is flat over the window or any value in it is NaN. Lookback length - 1.

Parameters ​

x ​

Series

y ​

Series

length ​

number

out? ​

Float64Array<ArrayBufferLike>

Returns ​

Float64Array