change
Syntax Format
change(series, n=1)
Overview
The change
function calculates the difference between the current series values and the series values over the chosen offset value from the current bar. You can use this function in scripts to analyze the change volume of the asset price over the chosen period. The function returns the series - series [n].
Parameters
Parameter | Type | Purpose | Default State |
---|---|---|---|
series | series | Input series | |
n | integer | Offset from the current bar | 1 |
Returns: series
.
Example
change_data = change(close, 14) -- calculating the 14-period closing prices change