namespace anychart.math.sma Improve this Doc
Namespace anychart.math.sma
Learn more about indicator mathematics.
Functions Overview
| calculate() | SMA calculation. | 
| calculationFunction() | Calculates SMA. | 
| createComputer() | Creates a SMA computer for the given table mapping. | 
| initContext() | Creates a context for SMA indicator calculation. | 
| startFunction() | Start calculation function for SMA indicator calculation. | 
Typedefs Overview
| anychart.math.sma.Context | Type definition for the context. | 
Functions Description
calculate
SMA calculation.
Params:
| Name | Type | Description | 
|---|---|---|
| context | anychart.math.sma.Context | SMA context | 
| value | number | Value. | 
Returns:
number - The calculated SMA indicator value.calculationFunction
Calculates SMA.
Params:
| Name | Type | Description | 
|---|---|---|
| row | anychart.data.TableComputer.RowProxy | Row proxy. | 
| context | anychart.math.sma.Context | Context. | 
Try it:
createComputer
Creates a SMA computer for the given table mapping.
Params:
| Name | Type | Description | 
|---|---|---|
| mapping | anychart.data.TableMapping | Data mapping. | 
| period | number | Indicator period. | 
Returns:
anychart.data.TableComputer - Table computer.Try it:
initContext
Creates a context for SMA indicator calculation.
Params:
| Name | Type | Default | Description | 
|---|---|---|---|
| period | number | 20 | Indicator period. | 
Returns:
anychart.math.sma.Context - Context.Try it:
startFunction
Start calculation function for SMA indicator calculation.
Params:
| Name | Type | Description | 
|---|---|---|
| context | anychart.math.sma.Context | Context. | 
Try it:
