Indicators.MACD()

Calculates the Moving Averages Convergence/Divergence indicator and returns its value.
await Indicators.MACD(symbol:string, timeframe:string, fastEmaPeriod:int, slowEmaPeriod:int, signalPeriod:int, appliedPrice:int, priceType:int, mode:int)

Parameters

Name Type Действие Значение по умолчанию
symbol string Symbol name on the data of which the indicator will be calculated. null means the current symbol.
timeframe string TimeFrame. It can be any of TimeFrame enumeration values. 0 means the current chart timeframe.
fastEmaPeriod int Fast EMA averaging period.
slowEmaPeriod int Slow EMA averaging period.
signalPeriod int Signal line averaging period.
appliedPrice int Applied price. It can be any of AppliedPrice enumeration values.
priceType int Price type
mode int Indicator line index. It can be one of the Indicators line identifiers enumeration values IndicatorLine.

Return value

Numerical values of the Moving Average of Oscillator indicator.

Description

In some systems it is called MACD Histogram and plotted as two lines. In MetaTrader 4 client terminal MACD is plotted as histogram.

Example

let listMACD = await Indicator.MACD(null, 0, 12, 26, 9, AppliedPrice.Close, PriceType.Bid, IndicatorLine.Main);