change
Change (Difference from historical value)
change(source, length)
Parameters
| Name | Type | Description |
|---|---|---|
source |
field | Data series |
length |
int | Periods to look back |
Formula
change = source - source[length]
Examples
change(close, 1) > 0; // positive gain from prior bar
change(high, 5) < 0; // lower high from 5 bars ago
change(volume, 10) >= volume[10]; // volume more than doubled from 10 bars ago
Returns
float
Range
length must be 1-400