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

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

author EAcpu | 2 reads | 0 comments |

Mass Index - indicator for MetaTrader 5

Quality index was popularized by Tushar Chande and Donald Dorsey. It is usually calculated by summing the exponentially smoothed moving average of the high and low daily ranges of the last 25 periods. The purpose of the index is to identify trend reversals by measuring the change in the average range between the highest and lowest prices. When the range becomes wider, the quality index increases, and when the range shrinks, the quality index decreases.

Exponential moving averages (e.g., period 9) are used to show buy (sell) signals. When the Quality Index attempts to predict a trend reversal, a long position is opened if the moving average shows a downtrend, and a short position is opened when the moving average shows an uptrend.

The indicator allows choosing a smoothing type from ten possible versions:

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.

Mass Index - indicator for MetaTrader 5


Attachment download

📎 smoothalgorithms.mqh (133.8 KB)

📎 xmassindex.mq5 (6.14 KB)

Source: MQL5 #512

Verification code Refresh