Documentation

iMACD

The function returns the handle of the Moving Averages Convergence/Divergence indicator. In systems where ОsМА is called MACD Histogram, this indicator is shown as two lines. In the client terminal the Moving Averages Convergence/Divergence looks like a histogram.

int  iMACD(
   string              symbol,              // symbol name
   ENUM_TIMEFRAMES     period,              // period
   int                 fast_ema_period,     // period for Fast average calculation
   int                 slow_ema_period,     // period for Slow average calculation
   int                 signal_period,       // period for their difference averaging
   ENUM_APPLIED_PRICE  applied_price        // type of price or handle
   );

Parameters

symbol

[in] The symbol name of the security, the data of which should be used to calculate the indicator. The NULL value means the current symbol.

period

[in] The value of the period can be one of the ENUM_TIMEFRAMES values, 0 means the current timeframe.

fast_ema_period

[in]  Period for Fast Moving Average calculation.

slow_ema_period

[in]  Period for Slow Moving Average calculation.

signal_period

[in]  Period for Signal line calculation.

applied_price

[in]  The price used. Can be any of the price constants ENUM_APPLIED_PRICE or a handle of another indicator.

Returned value

Returns the handle of a specified technical indicator,  in case of failure returns INVALID_HANDLE. The computer memory can be freed from an indicator that is no more utilized, using the IndicatorRelease() function, to which the indicator handle is passed.

Note

The buffer numbers are the following: 0 - MAIN_LINE, 1 - SIGNAL_LINE.