Lipi Reference
Lipi

Functions

array.standardize()

Returns a new array of z-scores: each element minus the mean, divided by the standard deviation. The original array is not changed.

Syntax

                array.standardize(series array id) → series array<float>
              

Arguments

id required series array

Return Type

series array<float>

Example


          //@lipi=2
indicator("array.standardize Example", overlay=false)
static array<float> closes = array.new_float(20, close)
array.shift(closes)
array.push(closes, close)
z = array.standardize(closes)
plot(array.last(z), title="Z-Score of Latest Close", color=color.blue)