# Stochastic Momentum (SMI)

> Shows where the close sits relative to the midpoint of the previous candles' high-low range, in percent of that range, with automatic divergence lines.

Updated: 2026-10-25T00:01:52.000Z · https://chartrider.com/docs/indicators/stochastic-momentum-index/

## What you see
A line in its own pane, scaled to the lowest and highest value of the visible candles. Green and red lines mark bullish and bearish divergences, as in the [RSI](https://chartrider.com/docs/indicators/rsi/).

## How it is calculated
ChartRider's version is the unsmoothed core of the stochastic momentum index. With N = Period:
- `HH` and `LL` are the highest high and the lowest low of the N candles **before** the current one. The current candle is not part of the range.
- `SMI = 100 × (close − (HH + LL) / 2) / (HH − LL)`

The classic SMI by William Blau also smooths the distance and the range with double EMAs and scales to ±100. This version does neither: it reacts immediately and runs from −50 (close at the previous low) to +50 (close at the previous high). Because the current candle is not part of the range, a close beyond the previous high or low gives values above +50 or below −50.

Divergences use `Period` as the swing window and the same rules as the RSI.

## How to read it
- Above 0 the close is in the upper half of the recent range, below 0 in the lower half.
- Above +50 or below −50 the close has broken out of the range of the previous N candles.
- Zero-line crossings mark shifts in momentum. Without smoothing, the line is noisy on low timeframes.

## Using it in strategies
Output: `value`. In the [Trade Setup](https://chartrider.com/docs/strategies/trade-setup/), "Compare" with `value` above 50 works as a breakout trigger and "With" at center 0 as a momentum filter. [WickScript](https://chartrider.com/docs/wickscript/) has no `smi` function, but you can write it with `hh = highest(high, 10)[1]`, `ll = lowest(low, 10)[1]` and `100 * ((close - (hh + ll) / 2) / (hh - ll))`, or load it with `use indicator "SMI" with period 10 as s` and read `s.value`.

## Settings

Open the settings with the slider icon next to the indicator (Indicators, `F3`). Numeric settings can be swept as Step 1 / Step 2 parameters when you run a strategy.

### Inputs

| Setting | Type | Default | Description |
|---|---|---|---|
| Period | Number | `10` | Number of previous candles (N) whose highest high and lowest low form the range. Also the swing window for divergence detection. (min 1) |
| Look Back Range | Number | `2` | Candles after a swing point that are checked before the swing counts for a divergence. Higher values give fewer, later divergences. (min 1) |
| Height | Number | `70` | Height of the pane in pixels. (min 10) |

### Styles

| Setting | Type | Default | Description |
|---|---|---|---|
| Line Color | Color | `#0f6347` |  |

## Outputs

These values can be used in Trade Setup triggers, filters and exits (see [Trade Setup](https://chartrider.com/docs/strategies/trade-setup/)) and in WickScript.

| Output | In WickScript | Description |
|---|---|---|
| value | `value` |  |

## Use in WickScript

`use indicator` creates this indicator inside a script, with settings by their ID. Each output is a field of the name after `as`. See [WickScript indicators](https://chartrider.com/docs/wickscript/indicators/).

```wickscript
wickscript 1
indicator "Stochastic Momentum (SMI) from the list" in pane
use indicator "SMI" with period 10 as mySmi
show mySmi.value as line "value"
```
