OPEN-SOURCE SCRIPT
SMI Histogram State Visualization

Stochastic Momentum Index (SMI) – State Histogram
One issue I always had with the standard SMI was how difficult it can be to clearly distinguish EMA crosses, especially when the oscillator is compressed near overbought or oversold levels. Important information is there — it’s just not always easy to read quickly.
This script is my solution to that problem.
By transforming the SMI into a state-based histogram, momentum, exhaustion, and EMA crosses become visually obvious at a glance.
How It Works
The Stochastic Momentum Index (SMI) measures price position relative to the midpoint of its recent high–low range, which makes it:
symmetric around zero
smoother than a classic stochastic
well suited for momentum analysis
Instead of a traditional line oscillator, the SMI is displayed as a color-coded histogram, while an EMA of the SMI is used as a confirmation signal.
Color-Coded Momentum States
The histogram dynamically changes color based on momentum state and EMA position:
🔴 Red – Oversold & Below EMA
Strong bearish momentum, downtrend still intact.
🟠 Orange – Oversold & Above EMA
Bearish momentum weakening, early bullish reversal potential.
🟢 Green – Overbought & Above EMA
Strong bullish momentum, trend continuation.
🟡 Yellow – Overbought & Below EMA
Bullish momentum weakening, early bearish reversal potential.
Faded colors represent neutral or transition phases near the zero line.
Best Use Cases
Quickly identifying EMA crosses inside overbought / oversold zones
Spotting early reversals before price reacts
Confirming momentum continuation
Filtering noise in ranging markets
This indicator is non-repainting and works on all timeframes.
Inputs
%K Length – Lookback window used to define the price range
%D Length – Smoothing applied to the momentum calculation
EMA Length – Confirmation smoothing applied to the SMI
Notes
This indicator is intended as a visual momentum and confirmation tool, not a standalone trading system.
Always use it in confluence with price action, market structure, and proper risk management.
One issue I always had with the standard SMI was how difficult it can be to clearly distinguish EMA crosses, especially when the oscillator is compressed near overbought or oversold levels. Important information is there — it’s just not always easy to read quickly.
This script is my solution to that problem.
By transforming the SMI into a state-based histogram, momentum, exhaustion, and EMA crosses become visually obvious at a glance.
How It Works
The Stochastic Momentum Index (SMI) measures price position relative to the midpoint of its recent high–low range, which makes it:
symmetric around zero
smoother than a classic stochastic
well suited for momentum analysis
Instead of a traditional line oscillator, the SMI is displayed as a color-coded histogram, while an EMA of the SMI is used as a confirmation signal.
Color-Coded Momentum States
The histogram dynamically changes color based on momentum state and EMA position:
🔴 Red – Oversold & Below EMA
Strong bearish momentum, downtrend still intact.
🟠 Orange – Oversold & Above EMA
Bearish momentum weakening, early bullish reversal potential.
🟢 Green – Overbought & Above EMA
Strong bullish momentum, trend continuation.
🟡 Yellow – Overbought & Below EMA
Bullish momentum weakening, early bearish reversal potential.
Faded colors represent neutral or transition phases near the zero line.
Best Use Cases
Quickly identifying EMA crosses inside overbought / oversold zones
Spotting early reversals before price reacts
Confirming momentum continuation
Filtering noise in ranging markets
This indicator is non-repainting and works on all timeframes.
Inputs
%K Length – Lookback window used to define the price range
%D Length – Smoothing applied to the momentum calculation
EMA Length – Confirmation smoothing applied to the SMI
Notes
This indicator is intended as a visual momentum and confirmation tool, not a standalone trading system.
Always use it in confluence with price action, market structure, and proper risk management.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.
Open-source Skript
Ganz im Sinne von TradingView hat dieser Autor sein/ihr Script als Open-Source veröffentlicht. Auf diese Weise können nun auch andere Trader das Script rezensieren und die Funktionalität überprüfen. Vielen Dank an den Autor! Sie können das Script kostenlos verwenden, aber eine Wiederveröffentlichung des Codes unterliegt unseren Hausregeln.
Haftungsausschluss
Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.