Math Operators

Indices of Minimum and Maximum (Time Since Range Extremes) (MINMAXINDEX)

Indexes of lowest and highest values over a specified period

Deep Dive

Everything You Need to Know

Under the Hood

How It Works

MINMAXINDEX returns both the index of the minimum and maximum values over the lookback period (default 30) - showing how many bars ago each extreme occurred. Two outputs: bars since low and bars since high. This provides complete timing information about recent range extremes in one efficient call. Values of 0 indicate the current bar is at that extreme.

In Practice

How Traders Use It

Traders use MINMAXINDEX to assess range dynamics and momentum. When both indices are low (recent extremes), the market is volatile and ranging. When both indices are high (old extremes), price is consolidating mid-range. Asymmetry reveals bias - if min index >> max index, price is near highs (bullish); reverse suggests bearish. Essential for range analysis and regime detection.

Highlights

MINMAXINDEX at a Glance

Returns indices (bars ago) for both min and max
Two outputs: bars since low, bars since high
0 = current bar is at that extreme
Default 30-period lookback
Reveals range dynamics and momentum bias
Efficient single-call range timing analysis

Get Started

Automate MINMAXINDEX with cryptorobot.ai

Build automated strategies using Indices of Minimum and Maximum (Time Since Range Extremes) and hundreds of other indicators. Connect to your favourite exchange and let the bot execute trades 24/7 — no code required.