Docs

ta.change

Measure how far a series moved over the last n bars, in its own units.

itm
ta.change(source, length)

source - source[length]: the change over length bars.

Parameters

A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.

NameKindTypeDefaultRangeDescription
sourceSeriesnumber--The series to read.
lengthConstantnumber11 to 10000Window in observed bars.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
length bars. Names in the warm-up are this operator’s parameters.
Missing values
na until length bars of history exist, and na when either observation is na.

Example

itm
ta.change(close, 1)
itm
plot(ta.change(close, 1), "Change")