CADOnArray class is designed for calculation of AD (Accumulation Distribution, A/D) values on indicator buffers.
Init() method with the optional parameter is called in the OnInit() function:
Solve() method with the following parameters is called in the OnCalculate() function:
Test_ADOnArray.mq5 is a sample indicator showing CADOnArray class application. IncADOnArray file must be placed to MQL5\Include\IncOnArray of the terminal data folder (IncOnArray folder must be created).
Accumulation/Distribution (A/D) Technical Indicator is determined by the changes in price and volume. The volume acts as a weighting coefficient at the change of price - the higher the coefficient (the volume) is, the greater the contribution of the price change (for this period of time) will be in the value of the indicator.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/669
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.Average Directional Movement Index (ADX)
The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.