API ReferenceNamespacestaFunctionscorrelationOn this pageFunction: correlation() correlation(a, b, length): Series Pearson correlation of two series over length bars, -1..1. na during warmup or when either series is flat. Both series must be on the same timeframe. Parameters a Series b Series length i32 Returns Series