SMI Fractal Iron HMASMI FRACTAL IRON HMA
Professional Multi-Engine Trading Overlay
Version 7.0 • February 2026 • Pine Script™ v6 • Overlay Indicator
By NPR21
FIVE INTEGRATED ENGINES
Fractal Pivots │ SMI Filter │ HMA Forecast │ Risk Management │ Short Trend Dashboard
DESCRIPTION
SMI Fractal Iron HMA integrates five complementary analytical engines into a single overlay indicator, designed so that each component addresses a different dimension of trade analysis — structure, momentum, trend context, risk parameters, and real-time directional scoring — and the outputs of each engine reinforce or qualify the signals of the others.
▸ Fractal Pivot Detection
Identifies structural swing highs and lows using fractal pivot logic with a key innovation: the left-side structural lookback and the right-side confirmation delay are split into two independent inputs. This allows traders to maintain high structural selectivity (catching only significant swing points) while independently controlling how many bars of confirmation are required before a signal prints. Setting Right Bars to zero enables zero-delay mode where the label appears on the forming bar itself.
▸ Stochastic Momentum Index (SMI) Filter
A double-smoothed EMA of the price-to-midpoint relationship, scaled to a configurable range. When enabled as a filter, long signals only print when SMI is rising and short signals only print when SMI is falling. Signals opposing the current momentum direction are silently suppressed, reducing noise without adding visual clutter.
▸ HMA Trend Duration Forecast
Tracks the Hull Moving Average slope to determine trend state. Each completed trend’s duration is stored in a rolling sample. The historical average projects the probable length of the current trend. On the chart: a white arrow line shows the forecast window, a Trend ↑ Up Real or Trend ↓ Down Real label updates in real time with the current bar count, and a Prob: label shows the forecasted duration. HMA BUY and HMA SELL labels print at each trend change with optional price display.
▸ Risk Management System
Activates on each confirmed pivot signal and draws five horizontal levels: Entry, Stop Loss (configurable in points or percentage), and three Take Profit tiers calculated as Reward:Risk multiples. Features include:
•TP hit tracking — each level changes to dashed with a check-mark label when price reaches it.
•Trailing stop — moves to breakeven at a configurable threshold, then trails by a fixed offset.
•TP2+ reversal exit — after TP2 is hit, closes the trade if price reverses by a specified distance before TP3.
•P&L dashboard — real-time display of direction, entry, current P&L in the selected currency, R:R ratio, dollar risk/reward at each TP, bars in trade, HMA trend direction, and probable trend length.
•Auto-reset — clears all trade objects when a trade completes (SL, TP3, or TP2+ reversal), readying for the next signal.
▸ Short Trend Dashboard
A 5-component real-time scoring engine that votes on the current bar’s directional bias:
•Momentum (25 pts) — price change vs. ATR-scaled threshold.
•Candle Structure (25 pts) — body-to-range ratio and wick rejection analysis.
•Micro Trend (25 pts) — fast/slow EMA crossover with ATR-normalized gap scoring.
•Acceleration (25 pts) — bar-to-bar momentum change detecting speed gain or loss.
•Volume B/S (10 pts) — estimated buy vs. sell pressure from close position within bar range.
The composite score (0–100) produces a letter grade (A+, A, B, C) and a directional label (BULLISH, BEARISH, LEAN BULL/BEAR, or NEUTRAL). The TEMP Heat Gauge (0–100) blends seven sub-indicators (ROC, RSI, Stochastic, Volume Pressure, EMA Position, Candle, Acceleration) into a single temperature reading (HOT / WARM / NEUTRAL / COOL / COLD). Scalper Mode activates ultra-fast EMA and momentum presets optimized for 1–5 minute charts with Instant Flip detection for single-bar reversals.
▸ Why These Five Engines Together
Each engine answers a different question. The pivot engine identifies where structure turns. The SMI filter confirms whether momentum supports the signal. The HMA forecast provides how long the trend is likely to last. The risk management system defines how much is at stake. The Short Trend Dashboard gives a right now directional confidence score. Together they create a workflow: detect the turn, confirm direction, understand trend context, manage the trade, and monitor conviction — all from a single indicator.
HOW TO USE
▸ Getting Started
1.Add the indicator to your chart. Default settings (Left 5 / Right 1) provide a balanced starting point with strong structural selectivity and minimal delay.
2.BUY labels appear below swing lows. SELL labels appear above swing highs. In Confirmed + Preview mode, semi-transparent labels flicker during bar formation and lock solid at bar close.
3.Use the HMA colored line and trend forecast labels to understand the broader trend context. HMA BUY and HMA SELL labels mark each trend change.
4.Enable Risk Management to see SL/TP lines and the P&L dashboard on each confirmed signal.
5.Monitor the Short Trend Dashboard for real-time confirmation. CONSENSUS +4/5 or +5/5 indicates strong alignment across all components.
▸ Tuning the Pivot Detection
•Left 5 / Right 5: Maximum accuracy. Pivot must be highest/lowest of 11 bars. 5-bar confirmation delay. Best for identifying only major swing points.
•Left 5 / Right 1: Strong selectivity, minimal delay. Preview label flickers on the confirmation bar. Good balance for scalping and active trading.
•Left 5 / Right 0: Zero-delay mode. Label appears on the pivot bar during formation. Fastest possible signal. Useful for scalping when combined with the SMI filter.
•Left 8–10 / Right 0: Zero delay with larger left lookback to compensate for missing right-side confirmation.
▸ Configuring Risk Management
•Enable the Risk Management Overlay toggle. Set Stop Loss in points (e.g., MNQ: 3–5 pts) or as a percentage of entry price.
•Set TP1, TP2, TP3 as Reward:Risk multiples (defaults: 2:1, 3:1, 4:1). Adjust to your trading style.
•Set Point Value for your instrument: MNQ = 2, MES = 5, MYM = 0.5, MGC = 10, MCL = 10.
•The P&L dashboard updates every bar showing dollar P&L, R:R ratio, and TP hit status.
•Enable trailing stop for trades that run: set breakeven threshold, trail start, and trail offset distances.
▸ Reading the Short Trend Dashboard
•Direction + Score: BULLISH/BEARISH/LEAN with a score of 0–100. Grade A+ or A = high conviction.
•TEMP Heat Gauge: Above 70 = HOT (overbought). Below 30 = COLD (oversold). 45–55 = NEUTRAL.
•CONSENSUS: Total vote out of 5 components. +4/5 or +5/5 = strong directional alignment.
•Scalper Mode: Ultra-fast presets for 1–5 min charts. Instant Flip marks single-bar reversals with ** notation.
▸ Label Display Options
•Stack: Label sits directly on the high/low with offset ticks. Text stacks vertically with optional timestamp.
•Pointer: Label offset to the side with a pointer coming off the corner pointing at the exact high/low of the bar.
•Timestamp: Five formats: HH:mm, HH:mm:ss, h:mm a, MMM dd HH:mm, MMM dd. Uses the chart’s time zone.
▸ Suggested Starting Settings
•Scalping (1–5 min): Left 5, Right 1, HMA Length 9–14, Scalper Mode ON, SL 3–5 pts
•Day Trading (5–15 min): Left 5, Right 2–3, HMA Length 14–20, Scalper Mode OFF, SL 5–10 pts
•Swing Trading (1H–4H): Left 5, Right 5, HMA Length 20–50, Scalper Mode OFF, SL 10–25 pts
•Zero-Lag Mode: Left 7–10, Right 0, SMI Filter ON, HMA Length 14, Scalper Mode ON
DISCLAIMER
This indicator is a technical analysis tool designed to assist with identifying potential swing reversal points, trend direction, and trade risk parameters. It is not a standalone trading system and does not constitute financial advice. No indicator can predict future price movement. Past performance of any signal methodology does not guarantee future results. Always use proper risk management and consider multiple sources of analysis. The author assumes no responsibility for trading losses. Use at your own risk. Indicator

SMI Ergodic Indicator/Oscillator▮ Introduction
The Stochastic Momentum Index Ergodic Indicator (SMII) is a technical analysis tool designed to predict trend reversals in the price of an asset.
It functions as a momentum oscillator, measuring the ratio of the smoothed price change to the smoothed absolute price change over a given number of previous periods.
The Ergodic SMI is based on the True Strength Index (TSI) and integrates a signal line, which is an exponential moving average (EMA) of the SMI indicator itself.
It provides a clearer picture of market trends than the traditional stochastic oscillator by incorporating the concept of "ergodicity", which helps remove market noise.
On ther other hand, the Stochastic Momentum Index Ergodic Oscillator (SMIO) is a histogram that measures the difference between TSI and it's signal line.
By default, in TradingView both SMII and SMIO are provided independently.
Here in this script these two indicators are combined, providing a more comprehensive view of price direction and market strength.
▮ Motivation: why another indicator?
The intrinsic value of this indicator lies in the fact that it allows fine adjustments in both calculation parameters, data source and visualization, features that are not present in the standard indicators or similar.
Also, trend lines breakouts and divergences detector were added.
▮ What to look for
When using the indicator, there are a few things to look out for.
First, look at the SMI signal line.
When the line crosses above -40, it is considered a buy signal, while the crossing below +40 is considered a sell signal.
Also, pay attention to divergences between the SMI and the price.
If price is rising but the SMI is showing negative divergence, it could indicate that momentum is waning and a reversal could be in the offing.
Likewise, if price is falling but the SMI is showing positive divergence, this could indicate that momentum is building and a reversal could also be in the offing.
Divergences can be considered in both indicator and/or histogram.
Examples:
▮ Notes
The indicator presented here offers both the "SMII" and the "SMIO", that is, the "Stochastic Momentum Index Ergodic Indicator" together with the "Stochastic Momentum Index Ergodic Oscillator" (histogram), as per the documentation described in reference links.
So it is important to highlight the differences in relation to my other indicator, Stochastic Momentum Index (SMI) Refurbished .
This last one is purely based on the **SMI**, which is implemented using smoothed ratio between the relative range and the high/low range.
Although they may seem the same in some situations, the calculation is actually different. The TSI tends to be more responsive at the expense of being noisier, while the SMI tends to be smoother. Which of these two indicators is best depends on the situation, the context, and the analyst's personal preference.
Please refer to reference links to more info.
▮ References
SMI documentation
SMII documentation
SMIO documentation
Indicator

SMI Ergodic Indicator/Oscillator of Money Flow Index▮ Introduction
The Stochastic Momentum Index Ergodic (SMII) indicator is a technical analysis tool designed to predict trend reversals in the price of an asset.
It functions as a momentum oscillator, measuring the ratio of the smoothed price change to the smoothed absolute price change over a given number of previous periods.
The Ergodic SMI is based on the True Strength Index (TSI) and integrates a signal line, which is an exponential moving average (EMA) of the SMI indicator itself.
The Ergodic SMI oscillator provides a clearer picture of market trends than the traditional stochastic oscillator by incorporating the concept of 'ergodicity', which helps remove market noise.
On ther other hand, MFI (Money Flow Index) is a technical analysis indicator used to measure the inflow of money into an asset and thus help identify buying and selling pressure in a given financial instrument.
When these two indicators are combined, they can provide a more comprehensive view of price direction and market strength.
▮ Motivation: why another indicator?
By combining SMII with MFI, we can gain even more insights into the market.
One way to do this is to use the MFI as an input to the SMII, rather than just using price.
This means we are measuring momentum based on buying and selling pressure rather than just price.
Furthermore, there is the possibility of making several fine adjustments to both the calculation and visualization parameters that are not present in other indicators.
▮ What to look for
When using the SMII MFI indicator, there are a few things to look out for.
First, look at the SMII signal line.
When the line crosses above -40, it is considered a buy signal, while the crossing below +40 is considered a sell signal.
Also, pay attention to divergences between the SMII and the price.
If price is rising but the SMII is showing negative divergence, it could indicate that momentum is waning and a reversal could be in the offing.
Likewise, if price is falling but the SMII is showing positive divergence, this could indicate that momentum is building and a reversal could also be in the offing.
Divergences can be considered in both indicator and/or histogram.
Examples:
▮ Notes
The indicator presented here offers both the 'SMII' and the 'SMIO', that is, the 'Stochastic Momentum Index Ergodic Indicator' together with the 'Stochastic Momentum Index Ergodic Oscillator' (histogram), as per the documentation described in reference links.
So it is important to highlight the differences in relation to my other indicator, the 'Stochastic Momentum Index (SMI) of Money Flow Index (MFI)':
This last one is purely based on the SMI , which is implemented using SMA smoothing for the relative range and the high/low range.
Although they may seem the same in some situations, the calculation is actually different. The TSI tends to be more responsive at the expense of being noisier, while the SMI tends to be smoother. Which of these two indicators is best depends on the situation, the context, and the analyst's personal preference.
Please refer to reference links to more info.
▮ References
SMI documentation
SMII documentation
SMIO documentation
MFI documentation Indicator

Stochastic Momentum Index (SMI) of Money Flow Index (MFI)"He who does not know how to make predictions and makes light of his opponents, underestimating his ability, will certainly be defeated by them."
(Sun Tzu - The Art of War)
▮ Introduction
The Stochastic Momentum Index (SMI) is a technical analysis indicator that uses the difference between the current closing price and the high or low price over a specific time period to measure price momentum.
On the other hand, the Money Flow Index (MFI) is an indicator that uses volume and price to measure buying and selling pressure.
When these two indicators are combined, they can provide a more comprehensive view of price direction and market strength.
▮ Improvements
By combining SMI with MFI, we can gain even more insights into the market. One way to do this is to use the MFI as an input to the SMI, rather than just using price.
This means we are measuring momentum based on buying and selling pressure rather than just price.
Another way to improve this indicator is to adjust the periods to suit your specific trading needs.
▮ What to look
When using the SMI MFI indicator, there are a few things to look out for.
First, look at the SMI signal line.
When the line crosses above -40, it is considered a buy signal, while the crossing below +40 is considered a sell signal.
Also, pay attention to divergences between the SMI MFI and the price.
If price is rising but the SMI MFI is showing negative divergence, it could indicate that momentum is waning and a reversal could be in the offing.
Likewise, if price is falling but the SMI MFI is showing positive divergence, this could indicate that momentum is building and a reversal could also be in the offing.
In the examples below, I show the use in conjunction with the price SMI, in which the MFI SMI helps to anticipate divergences:
In summary, the SMI MFI is a useful indicator that can provide valuable insights into market direction and price strength.
By adjusting the timeframes and paying attention to divergences and signal line crossovers, traders can use it as part of a broader trading strategy.
However, remember that no indicator is a magic bullet and should always be used in conjunction with other analytics and indicators to make informed trading decisions. Indicator

Reverse Stochastic Momentum Index On ChartIntroducing the Reverse Stochastic Momentum Index "On Chart" version
According to Investopedia :
“The Stochastic Momentum Index (SMI) is a more refined version of the stochastic oscillator, employing a wider range of values and having a higher sensitivity to closing prices.”
The SMI is considered a refinement of the stochastic oscillator developed by William Blau and introduced in 1993 in an attempt to provide a more reliable indicator, less subject to false swings.
It calculates the distance of the current closing price as it relates to the median of the high/low range of price.
The SMI has a normal range of values between +100 and -100.
When the present closing price is higher than the median, or midpoint value of the high/low range, the resulting value is positive.
When the current closing price is lower than that of the midpoint of the high/low range, the SMI has a negative value.
Here I have reverse engineered the SMI formula to derive 2 functions.
One function calculates the chart price at which the SMI will reach a particular SMI scale value.
The second function calculates the chart price at which the SMI will crossover its signal line.
I have employed those functions here to give the "crossover" price levels for :
Upper alert level ( default 40, color : aqua blue )
Mid-Line ( default value 0, color : white )
Lower alert level ( default -40, color : purple )
Signal line ( default 13, colors : bright red & lime green )
And also to give the SMI eq price ( colors : red & green )
The midline, upper and lower alert levels return the closing price which would make SMI equal to their respective values
The user can infer from this that.....
Closing above these prices will cause the Stochastic Momentum Index to cross above the associated levels
Closing below these prices will cause the Stochastic Momentum Index to cross below the associated levels
Signal line returns the closing price where Stochastic Momentum Index is equal to its signal line
The user can infer from this that.....
Closing above this price will cause the Stochastic Momentum Index to cross above the signal line
Closing below this price will cause the Stochastic Momentum Index to cross below the signal line
SMI eq price returns the closing price which would make the SMI equal to its previous value
The user can infer from this that.....
Closing above this price will cause the Stochastic Momentum Index to increase
Closing below this price will cause the Stochastic Momentum Index to decrease
Note : all returned prices have a returned value filter to replace any values below zero with zero to help prevent auto focus issues.
These levels are displayed as plotted lines on the chart and also as an optional infobox with choice of displayed info.
This allows the user to see directly on the chart the interplay between the various crossover levels and price action and to precisely plan entries, exits and stops for their SMI based trades.
Traditionally traders and analysts will consider:
Positives values above 40 indicate a bullish trend
Negative values below -40 indicate a bearish trend .
Common traditional ways to derive signals from the SMI :
When the SMI crosses below -40 and then moves back above it, a buy signal is generated.
When the SMI crosses above +40 and then moves back below it, a sell signal is generated.
When the SMI line crosses above the signal line. A signal to buy is generated
When the SMI line crosses below the signal line signal to sell is generated.
When the SMI crosses above the zeroline, signal line and the SMI eq level many interpret that as a full bullish bias signal and take trades only in that direction, vice versa for bearish bias.
Traders also look for divergences between the SMI and price action.
The SMI is often used in conjunction with the Chande Momentum Oscillator or R squared indicator to determine overall market trendiness where the SMI is used to determine the direction of the trend, and also with volume indicators to show if the momentum carries significant selling or buying pressure. Indicator

CT Reverse Stochastic Momentum IndexIntroducing the Caretakers Reverse Stochastic Momentum Index .
According to Investopedia :
“The Stochastic Momentum Index (SMI) is a more refined version of the stochastic oscillator, employing a wider range of values and having a higher sensitivity to closing prices.”
The SMI was developed by William Blau and introduced in 1993 in an attempt to provide a more reliable indicator, less subject to false swings.
It calculates the distance of the current closing price as it relates to the median of the high/low range of price.
The SMI has a normal range of values between +100 and -100.
When the present closing price is higher than the median, or midpoint value of the high/low range, the resulting value is positive.
When the current closing price is lower than that of the midpoint of the high/low range, the SMI has a negative value.
I have reverse engineered the SMI formula to derive 2 functions.
One function calculates the chart price at which the SMI will reach a particular SMI scale value.
The second function calculates the chart price at which the SMI will crossover its signal line.
I have employed those functions here to give the price level where the SMI will equal :
Upper alert level ( default 40 )
Zero-Line
Lower alert level ( default -40 )
Signal line
The user can infer from these values that when closing prices cross the levels shown, the SMI will cross the indicated level or signal line.
If the price value is less than zero the value will show "impossible".
The advantage of knowing the exact prices that this will happen should give the user an additional edge and precision in risk management.
These crossover levels are displayed via an optional infobox with choice of user selected info.
There is an option to change the decimal places shown.
For easy and intuitive reading of the indicator when ….
SMI is above the signal line both the SMI and Signal line and the space between them is Green.
SMI is below the signal line both the SMI and Signal line and the space between them is Red.
SMI is above the Zeroline the space between them is Green.
SMI is below the Zeroline the space between them is Red.
Traditionally traders and analysts will consider:
Positives values above 40 indicate a bullish trend
Negative values below -40 indicate a bearish trend .
Common traditional ways to derive signals from the SMI :
When the SMI crosses above the zeroline, a buy signal is generated.
When the SMI crosses below the zeroline, a sell signal is generated.
When the SMI crosses below -40 and then moves back above it, a buy signal is generated.
When the SMI crosses above +40 and then moves back below it, a sell signal is generated.
When the SMI line crosses above the signal line. A signal to buy / take profit is generated
When the SMI line crosses below the signal line. A signal to sell / take profit is generated.
Traders also look for divergences between the SMI itself or the SMI histogram and price action.
The SMI is often used in conjunction with the Chande Momentum Oscillator or R squared indicator to determine overall market trendiness where the SMI is used to determine the direction of the trend, and also with volume indicators to show if the momentum carries significant selling or buying pressure.
Indicator

Indicator

Inverse Fisher Transform on SMI (Stochastic Momentum Index)Inverse Fisher Transform on SMI (Stochastic Momentum Index)
About John EHLERS:
From California, USA, John is a veteran trader. With 35 years trading experience he has seen it all. John has an engineering background that led to his technical approach to trading ignoring fundamental analysis (with one important exception).
John strongly believes in cycles. He’d rather exit a trade when the cycle ends or a new one starts. He uses the MESA principle to make predictions about cycles in the market and trades one hundred percent automatically.
In the show John reveals:
• What is more appropriate than trading individual stocks
• The one thing he relies upon in his approach to the market
• The detail surrounding his unique trading style
• What important thing underpins the market and gives every trader an edge
About INVERSE FISHER TRANSFORM:
The purpose of technical indicators is to help with your timing decisions to buy or
sell. Hopefully, the signals are clear and unequivocal. However, more often than
not your decision to pull the trigger is accompanied by crossing your fingers.
Even if you have placed only a few trades you know the drill.
In this article I will show you a way to make your oscillator-type indicators make
clear black-or-white indication of the time to buy or sell. I will do this by using the
Inverse Fisher Transform to alter the Probability Distribution Function (PDF) of
your indicators. In the past12 I have noted that the PDF of price and indicators do
not have a Gaussian, or Normal, probability distribution. A Gaussian PDF is the
familiar bell-shaped curve where the long “tails” mean that wide deviations from
the mean occur with relatively low probability. The Fisher Transform can be
applied to almost any normalized data set to make the resulting PDF nearly
Gaussian, with the result that the turning points are sharply peaked and easy to
identify. The Fisher Transform is defined by the equation
1)
Whereas the Fisher Transform is expansive, the Inverse Fisher Transform is
compressive. The Inverse Fisher Transform is found by solving equation 1 for x
in terms of y. The Inverse Fisher Transform is:
2)
The transfer response of the Inverse Fisher Transform is shown in Figure 1. If
the input falls between –0.5 and +0.5, the output is nearly the same as the input.
For larger absolute values (say, larger than 2), the output is compressed to be no
larger than unity. The result of using the Inverse Fisher Transform is that the
output has a very high probability of being either +1 or –1. This bipolar
probability distribution makes the Inverse Fisher Transform ideal for generating
an indicator that provides clear buy and sell signals. Indicator
