Loading…

Stochastic Momentum Index

A plain Stochastic %K reads distance from the LOW of the lookback window only, which makes it lopsided - a close sitting exactly at the range midpoint still reads as a mid-range %K number that says nothing about which half of the range it is closer to relative to the range's own centre. The Stochastic Momentum Index instead reads distance from the range MIDPOINT, so a positive value means the close sits in the upper half of the recent range and a negative value the lower half, symmetric around zero. The other half of Blau's design is where the "double smoothing" actually happens: rather than computing a raw ratio and then smoothing the finished number (which is what a smoothed %K does), the SMI smooths the numerator (close minus midpoint) and the denominator (the range itself) separately, each through the same two-stage EMA cascade, before dividing. Smoothing before the division removes far more single-bar noise than smoothing the ratio afterwards can, because a spike in the numerator and a spike in the denominator on the same bar do not cancel out once the ratio has already been taken. Notes and limitations - The oldest bar in a freshly loaded history has no prior EMA state to recurse from; it is seeded with the raw first-bar values rather than left blank, so the first handful of bars understate the double smoothing until the recursion settles. - The SMI is clamped to +/-100 purely as a display safety margin - a degenerate near-zero range can otherwise produce an oversized ratio on an isolated bar. - Like any Stochastic-family oscillator, it measures where price sits inside its recent range, not whether that range itself is trending; it can stay pinned near an extreme through a strong sustained trend without ever reversing.

Indicator · MT4 · v1.0 · Free

About Stochastic Momentum Index

Stochastic Momentum Index is an indicator for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 5 settings, such as Range length, Smooth1 and Smooth2. MQL source code included.

Files in the download: StochasticMomentumIndex.mq4, StochasticMomentumIndex.txt.

Settings

SettingDefaultWhat it does
Range length10Highest high / lowest low lookback (%K length)
Smooth13First EMA smoothing period
Smooth23Second EMA smoothing period
Signal period10EMA period of the signal line
AlertstrueAlert once per closed bar on a signal-line cross

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: Stochastic · Momentum · Buy/Sell Arrows · Alerts · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria