IncVidyaOnArray - MetaTrader 5 Library | Forex Indicators Download - MT4/MT5 Resources

CVidyaOnArray class is used to calculate Vidya (variable exponential dynamic average) on the indicator buffer.
This initialize() indicator function calls the OnInit() method with the following parameters:
This solve() function calls the OnCalculate() method with the following parameters:
Additional methods:
Test_VidyaOnArray.mq5 is an indicator that demonstrates how to use the CVidyaOnArray class. The IncVidyaOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal's data folder (the IncOnArray folder must be created).
The Variable Exponential Dynamic Average technical indicator (VIDYA) was developed by Tushar Chande. This is a primitive method of calculating the exponential moving average (EMA) that dynamically changes with the average period. The average period depends on market volatility; the Chandler Momentum Oscillator (CMO) was chosen as the measure of volatility. This oscillator measures the ratio between the sum of positive increments and the sum of negative increments over a specific period (the CMO period). The CMO value is used as a ratio to the smoothing factor EMA. Therefore VIDYA must set parameters: CMO period and EMA period.

Attachment download
📎 incvidyaonarray.mqh (3.03 KB)
📎 test_vidyaonarray.mq5 (2.28 KB)
Source: MQL5 #636
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •