AnyChart
API Reference
Still have questions?
Contact support
Top

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

Simple Moving Average (SMA) indicator class. Learn more about the SMA indicator.

Methods Overview

Series
series()Indicator series instance.
Specific Indicators Settings
period()Indicator period setting.

Methods Description

period

Getter for the period.

Returns:

number - The period.
Setter for the period.

Params:

NameTypeDefaultDescription
periodnumber
20
Period.

Returns:

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

series

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

Params:

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

Returns:

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