MINMAXINDEX
Summary
Returns the absolute input indices of the lowest and highest values within each rolling window of optInTimePeriod bars. Index variant of MINMAX.
Formula
For each t: outMaxIdx[t] = argmax_{i in [t-N+1, t]} inReal[i]; outMinIdx[t] = argmin over the same window (N = optInTimePeriod).
Notes
- When several bars in a window share the extreme value, which bar's index is returned is not guaranteed to be a specific one of the tied bars.
Inputs
inReal— Input series scanned for extremes
Outputs
outMinIdx— Absolute index (into inReal) of the window minimumoutMaxIdx— Absolute index (into inReal) of the window maximum
Parameters
optInTimePeriod— Window length in bars
Implementation
TA-Lib Definition: minmaxindex.c · minmaxindex.yaml
| Native | File |
|---|---|
| C | ta_MINMAXINDEX.c |
| Rust | minmaxindex.rs |
| Java | Core.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Lowest/Highest Index