Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Quality Index (MI) - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |

Mass Index (MI) - indicator for MetaTrader 5

The Quality Index (MI) is designed to detect trend reversals based on changes in bandwidth between the highest and lowest prices.

If the bandwidth expands, the quality index increases, and if the bandwidth narrows, the quality index decreases. Quality index was popularized by Tushar Chande and Donald Dorsey.

According to D. Dorsey, the most important signal of the quality index should be the special model built by this indicator, called the "reversal bulge". A reversal bulge forms when the 25-period Quality Index first exceeds 27 and then falls below 26.5. In this case, the price turn is likely to be independent of the general nature of the trend, i.e. it does not matter whether the price moves up, down or fluctuates within the trading range.

In order to detect exactly what signal (buy or sell) a reversal bulge generates, a 9-period exponential moving average of the price is often used. When a reversal bulge appears, you should buy if the moving average is falling (eyeing the reversal) and sell if the moving average is rising.

MI = SUM (EMA (HIGH - LOW, 9) / EMA (EMA (HIGH - LOW, 9), 9), N)

This indicator can be smoothed not only using EMA. The smoothing algorithm can be changed from ten possible variants:

It should be noted that the Phase type parameters of different smoothing algorithms have completely different meanings. For JMA, it is an external phase variable that varies from -100 to +100. For T3, it is the smoothed ratio multiplied by 100 for better visualization; for VIDYA, it is the CMO oscillation period; for AMA, it is the slow EMA period. In other algorithms, these parameters do not affect smoothing. For AMA the fast EMA period is a fixed value, equal to 2 by default. For AMA, the ratio of raised powers is also equal to 2.

The indicator uses the SmoothAlgorithms.mqh library class (must be copied to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

The indicator was first implemented in MQL4 and released in the code base on February 8, 2007.

Mass Index (MI) - indicator for MetaTrader 5


Attachment download

📎 mass_index_bb.mq5 (14.43 KB)

📎 smoothalgorithms.mqh (133.8 KB)

Source: MQL5 #522

Verification code Refresh