ta.variance() - Pine Script Function
ta.variance()
Section titled “ta.variance()”Overview
Section titled “Overview”Variance is the expectation of the squared deviation of a series from its mean (ta.sma), and it informally measures how far a set of numbers are spread out from their mean.
Syntax
Section titled “Syntax”ta.variance(source, length, biased) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| source | series int/float | Series of values to process. |
Returns
Section titled “Returns”Variance of source for length bars back.
Remarks
Section titled “Remarks”- If biased is true, function will calculate using a biased estimate of the entire population, if false - unbiased estimate of a sample.