ta.mom
Measure momentum as the price change over the last n bars.
ta.mom(source, length)Momentum: source - source[length]. Identical to ta.change with an explicit length, kept because authors reach for the name.
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.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
source | Series | number | - | - | The series to read. |
length | Constant | number | - | 1 to 10000 | Window in observed bars. |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
lengthbars. Names in the warm-up are this operator’s parameters.- Missing values
- na until
lengthbars of history exist, and na when either observation is na.
Example
ta.mom(close, 10)plot(ta.mom(close, 10), "Momentum 10")