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 setting. |
macdSeries() | Indicator MACD series setting. |
signalSeries() | Signal series setting. |
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 |
---|---|---|---|
value | number | 12 | Fast period. |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
histogramSeries
Getter for the current indicator histogram series.
Returns:
anychart.core.stock.series.Base | anychart.core.stock.scrollerSeries.Base - The current histogram series.Try it:
Setter for the indicator histogram series.
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | anychart.enums.StockSeriesType | "column" | 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 current indicator MACD series.
Returns:
anychart.core.stock.series.Base | anychart.core.stock.scrollerSeries.Base - The current indicator MACD series.Try it:
Setter for the indicator MACD series.
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | anychart.enums.StockSeriesType | "line" | 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 |
---|---|---|---|
value | number | 9 | Signal period. |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it:
signalSeries
Getter for the current signal series.
Returns:
anychart.core.stock.series.Base | anychart.core.stock.scrollerSeries.Base - The current signal series.Try it:
Setter for the signal series.
Params:
Name | Type | Default | Description |
---|---|---|---|
type | string | anychart.enums.StockSeriesType | "line" | 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 |
---|---|---|---|
value | number | 26 | Slow period. |
Returns:
anychart.core.stock.indicators.MACD - Self instance for method chaining.Try it: