It should be noted that the normal values of the indicator start appearing after at least PeriodSlow number of bars, or even more. This is due to the fact that in the calculation of the EMA values, which are used to calculate the MACD, the recurrent formula is applied: X[t+1]=X[t]+K*(Price[t+1]-X[t]).The initial value of both EMA is accepted as equal to the current price: X=Price. This leads to the EMAs with the same period, but with different initial times, having different values at the same moment of time due to different initial EMA values. But after a fairly long period of time, the values of these EMAs become virtually identical. This is unforeseeable on usual charts because of the large number of bars of the window. For the ticker version, it is necessary to wait for the sufficient number of bars to be accumulated.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/7491
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.