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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.