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


The variability index shows whether a trend or flat movement prevails in a time series or random behavior.
Today, the most popular representatives of fractal time functions are financial time series. The fractal structure of these series is well known and, according to Mandelbrot, is “an actual reformulation of market folklore—namely, that when a market chart zooms in or out, the movements of a stock or currency all look similar, and therefore on the same time and price scale” [1].
Usually, in order to determine the fractal dimension, the Hurst exponent needs to be calculated [2]. However, for reliable calculation this index requires a large amount of data (~ 10^3), which is too much compared to the duration of the trading trend.
The author [1] inserted the fractal characteristic - the variation index (m) which is closely related to the common fractal dimension. Unlike the Hurst index, the amount of information required to determine the index is reduced by a factor of 2. This leads to its use as a local feature for determining the dynamics of price series. If m < 0.5, it can be interpreted as a trend, if m > 0.5 - it can be interpreted as flat.
The proposed indicator calculates the change index of the previous 2^n long interval. The "n" parameter is specified by the user.
The general rules for indicator application are as follows:

Attachment download
📎 ivar.mq5 (13.04 KB)
Source: MQL5 #463
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •