ta.argmin
Count how many bars ago the lowest value of the window was set.
ta.argmin(source, length, min=length)Bars since the lowest value in the window: exactly ta.lowestbars, under its statistics name. The count is never negative: 0 on the bar that set the low. It is a bar count, not an index from the start of the window.
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. |
min | Constant | number | - | 1 to 10000 | Valid values the window must hold before it reports (an option, written min=15). An na is skipped. Absent = length: the window must be full and gap-free. |
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
- Returns na until
lengthconsecutive non-na observations are in the window. An na resets the accumulation. With min=, an na is skipped and the extreme is found among the valid observations once there are at least min of them. The count is in bars back from the current bar, na slots included.
Example
ta.argmin(low, 20)plot(ta.argmin(low, 20), "Bars since low")