A double-smoothed stochastic that measures where the close sits relative to the midpoint of the recent range, producing a centered oscillator from -100 to +100.
The Stochastic Momentum Index (SMI) was introduced by William Blau in a 1993 Technical Analysis of Stocks & Commodities article as a refinement of the classic stochastic oscillator. The difference between the two is exact and worth stating precisely, because it answers the most common question about SMI. The regular stochastic asks: where is the close relative to the low of the recent high-low range? Its answer runs from 0 (at the range low) to 100 (at the range high), so its natural center is an awkward 50. The SMI instead asks: where is the close relative to the midpoint of that same range? Its answer is naturally centered at zero — positive when the close is in the upper half of the range, negative in the lower half — and Blau scales it to roughly -100 to +100. He then applies double exponential smoothing to both the numerator and denominator, which makes the line considerably smoother than a raw %K. The result is a centered, smoothed range-position oscillator. Like the stochastic it descends from, SMI describes where price has recently closed within its recent range; it predicts nothing. This entry is educational only, not financial advice, and trading involves risk of loss.
The calculation runs in four steps. First, over a lookback of k bars (commonly 10), find the highest high and lowest low, and compute the range midpoint: (highest high + lowest low) / 2. Second, form two raw series: the distance of the close from that midpoint (close minus midpoint), and the full range width (highest high minus lowest low). Third — the step that defines SMI — smooth each of those series twice with EMAs (commonly 3-period, applied twice). Smoothing numerator and denominator separately before dividing is deliberate: it damps the bar-to-bar jitter that makes raw %K so jagged, while keeping the ratio meaningful. Fourth, divide the smoothed distance by half of the smoothed range and multiply by 100. The half-range divisor is what produces the ±100 scale: a close pinned at the very top of the range sits a half-range above the midpoint, giving +100; a close at the very bottom gives -100; a close exactly at the midpoint gives 0. A signal line — an EMA of the SMI itself — is usually added. Note the divisor can approach zero when the range is extremely narrow (flat markets), so implementations must guard the division. Every component is built from completed past bars, so the SMI lags by construction, and the double smoothing that makes it clean also makes it slower than the stochastic it refines.
Common defaults are a 10-bar range lookback (%K length), double EMA smoothing of 3 and 3, and a 3-period EMA signal line; reference lines at +40 and -40 with a zero midline. Blau's own writings use several combinations (e.g., longer lookbacks with heavier smoothing such as 25/13). Longer smoothing gives a cleaner but slower line; shorter values approach the choppiness of the raw stochastic. As always, the defaults are conventions to test, not discovered truths.
//@version=6
indicator("Stochastic Momentum Index (SMI)", overlay = false)
lengthK = input.int(10, "Range Lookback (%K)", minval = 1)
smooth1 = input.int(3, "First EMA Smoothing", minval = 1)
smooth2 = input.int(3, "Second EMA Smoothing", minval = 1)
sigLen = input.int(3, "Signal EMA Length", minval = 1)
hh = ta.highest(high, lengthK)
ll = ta.lowest(low, lengthK)
mid = (hh + ll) / 2
distSm = ta.ema(ta.ema(close - mid, smooth1), smooth2)
rangeSm = ta.ema(ta.ema(hh - ll, smooth1), smooth2)
smi = rangeSm != 0 ? 100 * distSm / (rangeSm / 2) : 0.0
sig = ta.ema(smi, sigLen)
plot(smi, "SMI", color = color.blue)
plot(sig, "Signal", color = color.orange)
hline(40, "Upper", color = color.gray)
hline(0, "Zero", color = color.new(color.gray, 50))
hline(-40, "Lower", color = color.gray)Pro tip: Plot SMI and the classic stochastic on the same chart with matching lookbacks and watch a few dozen turns: you will see SMI's crossings arrive later but flip far less often. Whether that trade suits you depends on what you are reading it for — there is no setting where you get the smoothness without the delay. If your platform's SMI values differ from another's, check the smoothing type (EMA vs other) and order of operations before assuming a bug. Educational context only, not advice; SMI is descriptive, and all trading carries risk of loss.
Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.