Bars since the highest
How many bars ago the highest value of the window was.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| period | int | 30 | 1 to 5000 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| highest_bars | value | Optional | color theme.accent, style line, width 1 |
- Warm-up
- period - 1 bars (29 at the defaults)
- Repaints
- No
- Parity
- None
Formula
How many bars ago the highest value of the last period bars was, 0 when it is the current bar. When two bars share the highest value, the more recent one counts.