AnyChart
API Reference
Still have questions?
Contact support
Top

class anychart.core.stock.indicators.MACD Improve this Doc

Moving Average Convergence Divergence (MACD) indicator class. Learn more about the MACD indicator.

Methods Overview

Series
histogramSeries()Histogram series instance.
macdSeries()Indicator MACD series instance.
signalSeries()Signal series instance.
Specific Indicators Settings
fastPeriod()Fast period setting.
signalPeriod()Signal period setting.
slowPeriod()Slow period setting.

Methods Description

fastPeriod

Getter for the fast period.

Returns:

number - Fast period.
Setter for the fast period.

Params:

NameTypeDefaultDescription
periodnumber
12
Fast period.

Returns:

anychart.core.stock.indicators.MACD - Self instance for method chaining.

histogramSeries

Getter for the indicator histogram series instance.
Setter for the indicator histogram series type.

Params:

NameTypeDescription
typeanychart.enums.StockSeriesType | stringType of the histogram series (type as 'line', 'column', 'ohlc').

Returns:

anychart.core.stock.indicators.MACD - Self instance for method chaining.

macdSeries

Getter for the indicator MACD series instance.
Setter for the indicator MACD series type.

Params:

NameTypeDescription
typeanychart.enums.StockSeriesType | stringType of the indicator MACD series (type as "line", "column", "ohlc").

Returns:

anychart.core.stock.indicators.MACD - Self instance for method chaining.

signalPeriod

Getter for the signal period.

Returns:

number - Signal period.
Setter for the signal period.

Params:

NameTypeDefaultDescription
periodnumber
9
Signal period.

Returns:

anychart.core.stock.indicators.MACD - Self instance for method chaining.

signalSeries

Getter for the signal series instance.
Setter for the signal series type.

Params:

NameTypeDescription
typeanychart.enums.StockSeriesType | stringType of the signal series (type as 'line', 'column', 'ohlc').

Returns:

anychart.core.stock.indicators.MACD - Self instance for method chaining.

slowPeriod

Getter for the slow period.

Returns:

number - Slow period.
Getter and setter for the slow period.

Params:

NameTypeDefaultDescription
periodnumber
26
Slow period.

Returns:

anychart.core.stock.indicators.MACD - Self instance for method chaining.