change
Difference vs length bars ago (source − source[length]).
Reference/Math & comparisons/Function
change(source, length)
Short form change(1) uses close. Not a percent — use roc for that.
Parameters
| Name | Type | Description |
|---|---|---|
sourceoptional | series default close | Series to use. Omit it when the first argument is a number — ema(9) means ema(close, 9). |
length | int default 1 | How many bars back. Default 1. |
Return value
series
Short form: if the first argument is a number, Dovee uses close as the source.
Example
plot change(close, 1) as "Δ close"