Functions
talib.variance()
Variance of `source` over `length` bars. An optional `biased` flag chooses between the biased and unbiased forms of the calculation. `talib.stdev` has no such flag.
Syntax
talib.variance(series float source, series int length, series bool biased) → series float
Arguments
source required series float The series to measure. length required series int How many bars the window covers. biased series bool Optional flag choosing between the biased and unbiased forms. Return Type
series float Example
indicator("Variance Indicator", overlay=false)
length = input(20, "Variance Length")
varianceValue = talib.variance(close, length)
plot(varianceValue, color=color.blue, title="Variance")