OPEN-SOURCE SCRIPT
已更新 SMI 30m With Built-in Divergence Alerts

Stochastic Momentum Index SMI 30m is a simplified, single-timeframe Stochastic Momentum Index (SMI) designed for traders who want a clean momentum oscillator with clear crossover signals and automatic higher-timeframe filtering.
This version is locked to a 30-minute timeframe, making it consistent across any chart you place it on.
The script plots:
SMI Blue Line – the main momentum line
SMI Orange Line – the signal line (EMA-smoothed)
Overbought / Oversold regions
Optional colored background zones that highlight strong momentum extremes
Both the Blue and Orange plots are fully exposed, allowing users to manually create TradingView alerts for crossovers.
Additionally, the script includes two built-in alert conditions for traders who prefer automatic signals.
How the SMI is calculated
This script uses a double-EMA smoothing method to stabilize momentum:
Highest and lowest price ranges are calculated over the selected %K period.
Relative position of price inside that range is computed.
A double EMA is applied to both the range and the midpoint offset.
The SMI result is scaled to ±200 for clarity.
The Signal Line is a single-EMA applied to the SMI.
These parameters can be adjusted:
%K Length
%D Length
EMA Length
The default values match traditional 13-3-3 SMI settings.
Visual Components
1. SMI Blue Line
Represents the primary momentum movement.
Values above 40 indicate positive momentum; values below −40 indicate negative momentum.
2. SMI Orange Line
Acts as a smoothing signal line.
Crossovers between Blue and Orange often indicate momentum shifts.
3. Overbought / Oversold Zones
+40 = overbought boundary
−40 = oversold boundary
These levels help identify exhaustion points.
4. Gradient High/Low Zones
The script includes colored fill zones above +40 and below −40 to visually highlight extreme momentum regions.
Built-In Alerts
The indicator includes two pre-configured alert conditions:
1. Bearish Cross (Overbought)
Triggers when:
The Blue SMI crosses below the Orange SMI
AND the Blue SMI value is above 80
This represents a potential bearish divergence or momentum reversal from extreme highs.
Alert title:
SMI Bearish Cross
2. Bullish Cross (Oversold)
Triggers when:
The Blue SMI crosses above the Orange SMI
AND the Blue SMI value is below −80
This represents a potential bullish divergence or reversal from extreme lows.
Alert title:
SMI Bullish Cross
How to Use Alerts
After adding the indicator to your chart:
Open the Alerts panel
Select Condition → SMI (1 TF) 30m
Choose either:
SMI Bearish Cross
SMI Bullish Cross
Set your preferred trigger method:
Once per bar close
Once per bar
Once per minute
Create the alert
Traders can also manually create alerts for:
Blue crossing above Orange
Blue crossing below Orange
Because both plots are fully exposed.
Purpose
This indicator is intended for traders who want a stable, single-timeframe SMI with:
Clear structure
Extreme-zone highlighting
Exposed plots for custom alerts
Built-in reversal alerts
Consistent 30-minute TF regardless of chart
It can be used for:
Identifying trend reversals
Detecting momentum exhaustion
Confirming entries/exits
Spotting early divergence signals
This version is locked to a 30-minute timeframe, making it consistent across any chart you place it on.
The script plots:
SMI Blue Line – the main momentum line
SMI Orange Line – the signal line (EMA-smoothed)
Overbought / Oversold regions
Optional colored background zones that highlight strong momentum extremes
Both the Blue and Orange plots are fully exposed, allowing users to manually create TradingView alerts for crossovers.
Additionally, the script includes two built-in alert conditions for traders who prefer automatic signals.
How the SMI is calculated
This script uses a double-EMA smoothing method to stabilize momentum:
Highest and lowest price ranges are calculated over the selected %K period.
Relative position of price inside that range is computed.
A double EMA is applied to both the range and the midpoint offset.
The SMI result is scaled to ±200 for clarity.
The Signal Line is a single-EMA applied to the SMI.
These parameters can be adjusted:
%K Length
%D Length
EMA Length
The default values match traditional 13-3-3 SMI settings.
Visual Components
1. SMI Blue Line
Represents the primary momentum movement.
Values above 40 indicate positive momentum; values below −40 indicate negative momentum.
2. SMI Orange Line
Acts as a smoothing signal line.
Crossovers between Blue and Orange often indicate momentum shifts.
3. Overbought / Oversold Zones
+40 = overbought boundary
−40 = oversold boundary
These levels help identify exhaustion points.
4. Gradient High/Low Zones
The script includes colored fill zones above +40 and below −40 to visually highlight extreme momentum regions.
Built-In Alerts
The indicator includes two pre-configured alert conditions:
1. Bearish Cross (Overbought)
Triggers when:
The Blue SMI crosses below the Orange SMI
AND the Blue SMI value is above 80
This represents a potential bearish divergence or momentum reversal from extreme highs.
Alert title:
SMI Bearish Cross
2. Bullish Cross (Oversold)
Triggers when:
The Blue SMI crosses above the Orange SMI
AND the Blue SMI value is below −80
This represents a potential bullish divergence or reversal from extreme lows.
Alert title:
SMI Bullish Cross
How to Use Alerts
After adding the indicator to your chart:
Open the Alerts panel
Select Condition → SMI (1 TF) 30m
Choose either:
SMI Bearish Cross
SMI Bullish Cross
Set your preferred trigger method:
Once per bar close
Once per bar
Once per minute
Create the alert
Traders can also manually create alerts for:
Blue crossing above Orange
Blue crossing below Orange
Because both plots are fully exposed.
Purpose
This indicator is intended for traders who want a stable, single-timeframe SMI with:
Clear structure
Extreme-zone highlighting
Exposed plots for custom alerts
Built-in reversal alerts
Consistent 30-minute TF regardless of chart
It can be used for:
Identifying trend reversals
Detecting momentum exhaustion
Confirming entries/exits
Spotting early divergence signals
版本注释
Stochastic Momentum Index SMI 30m is a simplified, single-timeframe Stochastic Momentum Index (SMI) designed for traders who want a clean momentum oscillator with clear crossover signals and automatic higher-timeframe filtering.This version is locked to a 30-minute timeframe, making it consistent across any chart you place it on.
The script plots:
SMI Blue Line – the main momentum line
SMI Orange Line – the signal line (EMA-smoothed)
Overbought / Oversold regions
Optional colored background zones that highlight strong momentum extremes
Both the Blue and Orange plots are fully exposed, allowing users to manually create TradingView alerts for crossovers.
Additionally, the script includes two built-in alert conditions for traders who prefer automatic signals.
How the SMI is calculated
This script uses a double-EMA smoothing method to stabilize momentum:
Highest and lowest price ranges are calculated over the selected %K period.
Relative position of price inside that range is computed.
A double EMA is applied to both the range and the midpoint offset.
The SMI result is scaled to ±200 for clarity.
The Signal Line is a single-EMA applied to the SMI.
These parameters can be adjusted:
%K Length
%D Length
EMA Length
The default values match traditional 13-3-3 SMI settings.
Visual Components
1. SMI Blue Line
Represents the primary momentum movement.
Values above 40 indicate positive momentum; values below −40 indicate negative momentum.
2. SMI Orange Line
Acts as a smoothing signal line.
Crossovers between Blue and Orange often indicate momentum shifts.
3. Overbought / Oversold Zones
+40 = overbought boundary
−40 = oversold boundary
These levels help identify exhaustion points.
4. Gradient High/Low Zones
The script includes colored fill zones above +40 and below −40 to visually highlight extreme momentum regions.
Built-In Alerts
The indicator includes two pre-configured alert conditions:
1. Bearish Cross (Overbought)
Triggers when:
The Blue SMI crosses below the Orange SMI
AND the Blue SMI value is above 60
This represents a potential bearish divergence or momentum reversal from extreme highs.
Alert title:
SMI Bearish Cross
2. Bullish Cross (Oversold)
Triggers when:
The Blue SMI crosses above the Orange SMI
AND the Blue SMI value is below −60
This represents a potential bullish divergence or reversal from extreme lows.
Alert title:
SMI Bullish Cross
How to Use Alerts
After adding the indicator to your chart:
Open the Alerts panel
Select Condition → SMI (1 TF) 30m
Choose either:
SMI Bearish Cross
SMI Bullish Cross
Set your preferred trigger method:
Once per bar close
Once per bar
Once per minute
Create the alert
Traders can also manually create alerts for:
Blue crossing above Orange
Blue crossing below Orange
Because both plots are fully exposed.
Purpose
This indicator is intended for traders who want a stable, single-timeframe SMI with:
Clear structure
Extreme-zone highlighting
Exposed plots for custom alerts
Built-in reversal alerts
Consistent 30-minute TF regardless of chart
It can be used for:
Identifying trend reversals
Detecting momentum exhaustion
Confirming entries/exits
Spotting early divergence signals
版本注释
Stochastic Momentum Index SMI 30m is a simplified, single-timeframe Stochastic Momentum Index (SMI) designed for traders who want a clean momentum oscillator with clear crossover signals and automatic higher-timeframe filtering.This version is locked to a 30-minute timeframe, making it consistent across any chart you place it on.
The script plots:
SMI Blue Line – the main momentum line
SMI Orange Line – the signal line (EMA-smoothed)
Overbought / Oversold regions
Optional colored background zones that highlight strong momentum extremes
Both the Blue and Orange plots are fully exposed, allowing users to manually create TradingView alerts for crossovers.
Additionally, the script includes two built-in alert conditions for traders who prefer automatic signals.
How the SMI is calculated
This script uses a double-EMA smoothing method to stabilize momentum:
Highest and lowest price ranges are calculated over the selected %K period.
Relative position of price inside that range is computed.
A double EMA is applied to both the range and the midpoint offset.
The SMI result is scaled to ±200 for clarity.
The Signal Line is a single-EMA applied to the SMI.
These parameters can be adjusted:
%K Length
%D Length
EMA Length
The default values match traditional 13-3-3 SMI settings.
Visual Components
1. SMI Blue Line
Represents the primary momentum movement.
Values above 40 indicate positive momentum; values below −40 indicate negative momentum.
2. SMI Orange Line
Acts as a smoothing signal line.
Crossovers between Blue and Orange often indicate momentum shifts.
3. Overbought / Oversold Zones
+40 = overbought boundary
−40 = oversold boundary
These levels help identify exhaustion points.
4. Gradient High/Low Zones
The script includes colored fill zones above +40 and below −40 to visually highlight extreme momentum regions.
Built-In Alerts
The indicator includes two pre-configured alert conditions:
1. Bearish Cross (Overbought)
Triggers when:
The Blue SMI crosses below the Orange SMI
AND the Blue SMI value is above 60
This represents a potential bearish divergence or momentum reversal from extreme highs.
Alert title:
SMI Bearish Cross
2. Bullish Cross (Oversold)
Triggers when:
The Blue SMI crosses above the Orange SMI
AND the Blue SMI value is below −60
This represents a potential bullish divergence or reversal from extreme lows.
Alert title:
SMI Bullish Cross
How to Use Alerts
After adding the indicator to your chart:
Open the Alerts panel
Select Condition → SMI (1 TF) 30m
Choose either:
SMI Bearish Cross
SMI Bullish Cross
Set your preferred trigger method:
Once per bar close
Once per bar
Once per minute
Create the alert
Traders can also manually create alerts for:
Blue crossing above Orange
Blue crossing below Orange
Because both plots are fully exposed.
Purpose
This indicator is intended for traders who want a stable, single-timeframe SMI with:
Clear structure
Extreme-zone highlighting
Exposed plots for custom alerts
Built-in reversal alerts
Consistent 30-minute TF regardless of chart
It can be used for:
Identifying trend reversals
Detecting momentum exhaustion
Confirming entries/exits
Spotting early divergence signals
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Follow me on YouTube where I post videos of my Trading and you will find a link to my TradingView Trading Chart 👉 youtube.com/@MamboCryptoTrader 📺
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
Follow me on YouTube where I post videos of my Trading and you will find a link to my TradingView Trading Chart 👉 youtube.com/@MamboCryptoTrader 📺
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。