talib.correlation
Correlation between two series, source1 and source2, measured over length bars.
Both series are ordinary arguments, so you can correlate anything a script can compute — not only prices.
talib.correlation(series float source1, series float source2, series int length) → series float| Parameter | Type | Required | Description |
|---|---|---|---|
source1 | series float | yes | First of the two series being compared. |
source2 | series float | yes | Second of the two series being compared. |
length | series int | yes | How many bars the measurement covers. |
Returns series float — A series float correlation value.
indicator("Correlation of the close and the open")
plot(talib.correlation(close, open, 20))See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.