Log return
The natural log of the value over the previous value.
Inputs
| Name | Type | Default |
|---|---|---|
| source | source | close |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| log_return | value | Optional | color theme.accent, style line, width 1 |
- Warm-up
- 1 bars (1 at the defaults)
- Repaints
- No
- Parity
- None
Formula
ln(source[i] / source[i-1]). No value on the first bar, or when either value is missing or not above zero.