The CDemaOnArray class is intended for calculation of DEMA (Double Exponential Moving Average) on an indicator buffer.
The Init() method with the following parameters is called in the OnInit() function of the indicator:
The Solve() method with the following parameters is called in the OnCalculate() function:
Test_DemaOnArray.mq5 is an indicator demonstrating how to use the CDemaOnArray class. The IncDemaOnArray file must be located in the MQL5\Include\IncOnArray directory of the terminal data folder (the IncOnArray folder must be created). The CMAOnArray class for the IncMAOnArray file is required for this class for work.
Double Exponential Moving Average Technical Indicator (DEMA) was developed by Patrick Mulloy and published in February 1994 in the "Technical Analysis of Stocks & Commodities" magazine. It is used for smoothing price series and is applied directly on a price chart of a financial security. Besides, it can be used for smoothing values of other indicators.
Translated from Russian by MetaQuotes Software Corp.
Original code: http://www.mql5.com/ru/code/657