Skip to content
Algo Trade Analytics Docs

array.stdev() - Pine Script Function

The function returns the standard deviation of an array’s elements.

array.stdev(id, biased) → series float
NameTypeDescription
idarray<int/float>An array object.

The standard deviation of the array’s elements.

  • If biased is true, the function calculates using a biased estimate of the entire population. If biased is false, it uses an unbiased estimate of a sample.
//@version=6
indicator("array.stdev example")
a = array.new_float(0)
for i = 0 to 9
array.push(a, close[i])
plot(array.stdev(a))