VIDYA Moving Average Indicator for MT4

In this article we are going to present a custom indicator for Metatrader 4 that is designed to display a VIDYA adaptive moving average overlaid on the price action on the price charts. This indicator can be modified to calculate the moving average with different price types (closing price, opening price, maximum price, minimum price, median price, typical price and weighted price) and with any period.

Before continuing to talk about this custom indicator, we are going to explain what is the VIDYA moving average and what are its main characteristics.

What is Chande’s VIDYA Adaptive Moving Average?

The VIDYA indicator (Chande’s Variable Index Dynamic Average) is an adaptive weighted moving average with interesting properties that distinguish it from other moving averages. It was developed by Tushar Chande as an attempt to improve the performance of the EMA (Exponential Moving Average) indicator. Chande introduced the indicator in the Technical Analysis of Stocks & Commodities magazine in March 1992.

The indicator was later modified and featured in The New Technical Trader by Tushar Chande and Stanley Kroll, John Wiley and Sons, New York in 1994.

Like all other moving average indicators, the VIDYA smooths out market noise and shows market trends more clearly.

To achieve this goal, the indicator filters out market fluctuations (the noise in price action) by averaging the price values of the periods over which it is calculated. In the process, an additional value (weight) is added to the average prices, as is done during the calculation of all weighted indicators, such as EMA, LWMA, and SMMA. But during the calculation of the VIDYA indicator, the price of each period receives an increase in weight or weighting, adapted to the volatility of the current market.

It should be noted that the value of the smoothing factor (F) is calculated with the help of the period EMA, and the increase or decrease of the indicator value is achieved using the Chande momentum oscillator as a measure of the volatility of the market. As a result, the indicator slows down and does not react to market volatility when it increases and, on the contrary, speeds up when a strong constant trend occurs (market volatility is reduced).

In the image below, the yellow line of the 26-period VIDYA indicator remains more indifferent to market volatility and looks smoother compared to the lines of the other moving average indicators of the same number of periods.

VYDIA Adaptative Moving Average
VIDYA Adaptive Moving Average of 10 periods compared to the SMA and EMA of the same number of periods

By using the VIDYA indicator, a trader gets a clear picture of market behavior and receives fewer wrong signals. This allows fewer mistakes to be made when analyzing price action.

The VIDYA calculation formula is as follows:

VIDYAi = Price x F x ABS(CMOi) + VIDYAi-1 x (1 – F x ABS(CMOi))

where:

VIDYAi – is the value of the VIDYA indicator in the current period.

Price – is the price of the period in which the value of the indicator is being calculated. The closing price is usually used, but other types of prices can be used, such as the opening price or the minimum price of the period.

F = 2/(EMA_Period+1) – is the smoothing factor, calculated in the same way as in the exponential moving average.

ABS(CMOi) – is the absolute value of the current CMO oscillator.

VIDYAi-1 – is the value of the VIDYA indicator for the period immediately prior to the period being calculated.

VIDYA Moving Average for Metatrader 4

As we saw in the previous section, the calculation of the VIDYA adaptive moving average is more complex compared to other moving average indicators, such as the EMA or the SMA.

Therefore, to facilitate the implementation and use of VIDYA in different trading strategies, we have created a free custom indicator for Metatrader 4 that displays this adaptive moving average on any chart and time frame of any instrument traded on this platform.

The version of this VIDYA indicator for MT4 is called VIDYA.ex4 and can be downloaded free of charge at the end of this article.

Even though the VIDYA moving average is a novel indicator that smooths out price action and follows market trends better than other moving averages, plus it reacts very poorly in ranging markets (fewer false signals), it is not recommended to use it as the only tool for opening and closing positions in the market. It is best used as part of a complete and well-evaluated trading strategy.

The image below shows a price chart on the EUR/USD currency pair with the VIDYA Adaptive Moving Average indicator overlaid on the price action:

VIDYA indicator for MT4

As the chart above shows, the VIDYA moving average smoothes out price action and closely follows trending price movements, but reacts very little to swings up and down in trading ranges, i.e. high volatility markets. In fact, in ranging markets this moving average is practically flat (zero slope), which means that it generates much fewer false signals than other moving averages, such as the EMA which reacts more easily to the most recent price movements, even in the periods in which the price moves in a defined range without a clear trend.

Thanks to this, VIDYA is a more adequate tool to identify trends (the market movements with the most profit potential) and differentiate them from range movements. In trend-following strategies, VIDYA can be particularly useful, especially to spot the start of a new trend.

This indicator has four configuration parameters:

  • VIDYA Calculation: Used to modify the time period of the smoothing factor F for calculating the EMA in the VIDYA. The default value is 10 periods.
  • CMO Oscillator Period: Here the trader can modify the calculation period of the Chande oscillator used in the VIDYA calculation. The default value is 10 periods.
  • Price Applied in the calculation: For the calculation of this moving average, the trader can use the closing price, opening price, maximum price, minimum price, median price, typical price, and weighted price. The default value is the closing price.

These parameters are shown in the following image:

Download and installation of the VIDYA indicator for MT4

This VIDYA Adaptive Moving Averages custom indicator was created by the team at ForexDominion and can be downloaded and used free of charge.

The VIDYA.mql4 indicator is installed according to the standard methodology for installing indicators in Metatrader 4. You can download it through the following link:

You can access a complete list of free modified indicators for MT4 and MT5 platforms in the following section of the site: List of Custom Indicators For Metatrader


Leave a Comment