All indicators

MACD + SMI

Jan 13, 2017

Static chart image
SignalsOscillatorsMoving Averages

The MACD + SMI indicator combines the Moving Average Convergence Divergence (MACD) and the Stochastic Momentum Index (SMI) Ergodic oscillator into a single tool to help traders identify trend direction and momentum shifts. By integrating these two momentum oscillators, the script provides a comprehensive view of market dynamics, highlighting when price momentum is gaining strength or entering a consolidation phase.

Usage

The indicator can be used to identify trend continuations or potential reversals by observing the MACD histogram and the SMI lines.

  • MACD Histogram: The histogram colors change based on momentum. Stronger green/red colors indicate increasing momentum, while lighter shades indicate slowing momentum.
  • Gray Zone: By default, the histogram turns gray when the momentum value is within a specific threshold (between -2 and 2). This helps traders identify "noise" or low-momentum zones where price may be ranging.
  • SMI Ergodic: The SMI lines (Oscillator and Signal) provide an additional layer of trend confirmation. Crossovers between the SMI line and its signal line can be used to spot entry or exit points.
  • Combined Signals: Traders often look for confluence between the MACD histogram crossing the zero line and SMI crossovers to validate high-probability trade setups.

Details

The script calculates the standard MACD using Fast, Slow, and Signal lengths. To make the MACD values more visible alongside the SMI, a scaling factor is applied based on the price of the asset.

The SMI Ergodic component is based on the True Strength Index (TSI) calculation, which is then smoothed with an Exponential Moving Average (EMA) to create a signal line. The indicator includes built-in alerts for MACD zero-line crossings and SMI signal line crossovers, facilitating automated monitoring.

Settings

MACD Settings

  • Gray color histogram?: Toggles the gray coloring for the histogram when values are within the neutral zone.
  • Show plots on MACD?: Enables or disables the visibility of the MACD and Signal lines.
  • MACD Fast Length: The period for the shorter-term EMA in the MACD calculation.
  • MACD Slow Length: The period for the longer-term EMA in the MACD calculation.
  • MACD Signal Length: The smoothing period for the MACD signal line.

SMI Settings

  • Show SMI?: Toggles the visibility of the SMI Ergodic lines.
  • SMI Short Period: The short-term smoothing period for the SMI calculation.
  • SMI Long Period: The long-term smoothing period for the SMI calculation.
  • SMI Signal Line Period: The EMA length used to create the SMI signal line.

FAQ

How do I interpret the gray bars in the histogram?

The gray bars indicate that the MACD momentum is currently low (within the -2 to 2 range), suggesting a lack of clear trend direction or a period of consolidation.

Can I use this for assets other than Forex?

While the original concept focused on major currency pairs, the logic of MACD and SMI is universal and can be applied to stocks, crypto, and indices, though users should adjust the lengths to fit the specific asset's volatility.

How do I access MACD + SMI?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.