talib.change

The difference between the current value of source and its value length bars back. Three overloads exist, one each for an int, a float and a bool source, and the returned type follows the source you pass. length is optional in all three.

talib.change(series bool source, series int length) → series bool
talib.change(series float source, series int length) → series float
talib.change(series int source, series int length) → series int
ParameterTypeRequiredDescription
sourceseries boolyesThe series to compare against its own past. Int, float and bool sources each have their own overload.
lengthseries intnoOptional. How far back the comparison reaches.

Returns series bool or series float or series int — A series of the same data type as source: series int, series float or series bool.

indicator("Change since the previous bar")
plot(talib.change(close, 1))

See also talib.alma · talib.atr · talib.barssince

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade