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
Setter for the fast period.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| period | number | 12 | Fast period. |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
histogramSeries
Getter for the indicator histogram series instance.
Returns:
anychart.core.stock.series.Base | anychart.core.stock.scrollerSeries.Base - Indicator histogram series.Try it:
Setter for the indicator histogram series type.
Params:
| Name | Type | Description |
|---|---|---|
| type | anychart.enums.StockSeriesType | string | Type of the histogram series (type as 'line', 'column', 'ohlc'). |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
macdSeries
Getter for the indicator MACD series instance.
Returns:
anychart.core.stock.series.Base | anychart.core.stock.scrollerSeries.Base - Indicator MACD series.Try it:
Setter for the indicator MACD series type.
Params:
| Name | Type | Description |
|---|---|---|
| type | anychart.enums.StockSeriesType | string | Type of the indicator MACD series (type as "line", "column", "ohlc"). |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
signalPeriod
Setter for the signal period.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| period | number | 9 | Signal period. |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
signalSeries
Getter for the signal series instance.
Returns:
anychart.core.stock.series.Base | anychart.core.stock.scrollerSeries.Base - Indicator signal series.Try it:
Setter for the signal series type.
Params:
| Name | Type | Description |
|---|---|---|
| type | anychart.enums.StockSeriesType | string | Type of the signal series (type as 'line', 'column', 'ohlc'). |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
slowPeriod
Getter and setter for the slow period.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| period | number | 26 | Slow period. |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
