Unlocking the Stochastic Momentum Index (Blau_SMI) for MetaTrader 5: A Trader's Guide

Mike 2011.06.28 20:42 20 0 0
Attachments

Author: Andrey N. Bolkonsky

The Stochastic Momentum Index (SMI), created by William Blau, is a powerful tool for traders who want to analyze market momentum effectively. This indicator is based on the Stochastic Momentum Indicator, which you can dive deeper into by checking out Momentum, Direction, and Divergence: Applying the Latest Momentum Indicators for Technical Analysis.

The SMI is normalized to half of the q-period price range and scaled within the [–100,+100] interval. Traders interpret SMI values as indicators of market conditions: positive values suggest overbought conditions, while negative values indicate oversold states.

  • Place WilliamBlau.mqh in terminal_data_folder\MQL5\Include\
  • Place Blau_SMI.mq5 in terminal_data_folder\MQL5\Indicators\

Stochastic Momentum Index Blau_SMI

How the SMI is Calculated:

The calculation for the Stochastic Momentum Index is as follows:

                              100*EMA(EMA(EMA( price-1/2*[LL(q)+HH(q)] ,r),s),u)                  100 * SM(price,q,r,s,u)
SMI(price,q,r,s,u) = --------------------------------------------------------------- = -------------------------------------------------
                                       EMA(EMA(EMA( 1/2*[HH(q)-LL(q)] ,r),s),u)            EMA(EMA(EMA( 1/2*[HH(q)-LL(q)] ,r),s),u)

Where:

  • price - close price;
  • LL(q) - minimum price over the last q bars;
  • HH(q) - maximum price over the last q bars;
  • sm(price,q)=price-1/2*[LL(q)+HH(q)] - q-period Stochastic Momentum;
  • SM(price,q,r,s,u) - triple smoothed q-period Stochastic Momentum;
  • HH(q)-LL(q) - the price range over the last q bars;
  • 1/2*[LL(q)+HH(q)] - midpoint of the q-period price range;
  • 1/2*[HH(q)-LL(q)] - half of the q-period price range;
  • EMA(...,r) - first smoothing using the exponentially smoothed moving average with period r, applied to:
    • the Stochastic Momentum;
    • half of the q-period price range;
  • EMA(EMA(...,r),s) - second smoothing using EMA of period s, applied to the result of the first smoothing;
  • EMA(EMA(EMA(...,r),s),u) - third smoothing using EMA of period u, applied to the result of the second smoothing.

Input Parameters:

  • q - period used for the calculation of Stochastic Momentum (default q=5);
  • r - period of the first EMA applied to stochastic (default r=20);
  • s - period of the second EMA applied to the result of the first smoothing (default s=5);
  • u - period of the third EMA applied to the result of the second smoothing (default u=3);
  • AppliedPrice - price type (default AppliedPrice=PRICE_CLOSE).

Important Notes:

  • Ensure that q > 0;
  • r > 0, s > 0, u > 0. If r, s, or u = 1, smoothing is not applied;
  • Minimum rates = (q - 1 + r + s + u - 3 + 1).
List
Comments 0