Functions
Statistics
8 names in this group.
Each comes with its signature and an example.
ta.median
Median of the last length values
median(src: Source, length: number): Seriesta.mode
Most frequent of the last length values (the smallest on a tie)
mode(src: Source, length: number): Seriesta.percentile
The value at percent (0–100) of the last length values, interpolated
percentile(src: Source, length: number, percent: number): Seriesta.percentile(close, 100, 90)ta.percentrank
% of the previous length values at or below this one
percentrank(src: Source, length: number): Seriesta.range
Highest − lowest of the last length values
range(src: Source, length: number): Seriesta.dev
Mean absolute deviation
dev(src: Source, length: number): Seriesta.variance
Variance (stdev squared)
variance(src: Source, length: number): Seriesta.correlation
Correlation of a and b over the last length bars (−1 to 1)
correlation(a: Source, b: Source, length: number): Seriesta.correlation(close, volume, 50)