IMI
IMI
Summary
Intraday Momentum Index: an RSI-like 0-100 oscillator built from the open-to-close body of each bar. Over a rolling window it ratios cumulative up-body moves against total up+down body moves.
Formula
upsum = Σ(close-open) for bars with close>open; downsum = Σ(open-close) for bars with close<=open, over window [i-lookback, i]; IMI = 100 * upsum/(upsum+downsum)
Inputs
inOpen— Open price of each barinClose— Close price of each bar
Outputs
outReal— IMI oscillator value, 0-100
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInTimePeriod | integer | 14 | 2–100000 | Rolling window length for the up/down body sums |
Properties
Numerical Stability: Start-Independent
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
Implementation
TA-Lib Definition: imi.c · imi.yaml
| Native | File |
|---|---|
| C | ta_IMI.c |
| Rust | imi.rs |
| Java | Core_IMI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Intraday Momentum Index