Top
You are looking at an outdated 7.13.1 version of this document. Switch to the 7.14.0 version to see the up to date information.

namespace anychart.math.ema Improve this Doc

Namespace anychart.math.ema
Learn more about indicator mathematics.

Functions Overview

calculate()EMA calculation.
calculationFunction()Calculates EMA.
createComputer()Creates an EMA computer for the given table mapping.
initContext()Creates a context for EMA indicator calculation.
startFunction()Start calculation function for EMA indicator calculation.

Typedefs Overview

anychart.math.ema.ContextType definition for the context.

Functions Description

calculate

EMA calculation.

Params:

Name Type Description
context anychart.math.ema.Context EMA context.
value number Value.

Returns:

number - The calculated EMA indicator value.

calculationFunction

Calculates EMA.

Params:

Name Type Description
row anychart.data.TableComputer.RowProxy Row proxy.
context anychart.math.ema.Context Context.

Try it:

createComputer

Creates an EMA 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 EMA indicator calculation.

Params:

Name Type Default Description
period number
20
Indicator period.

Returns:

anychart.math.ema.Context - Context.

Try it:

startFunction

Start calculation function for EMA indicator calculation.

Params:

Name Type Description
context anychart.math.ema.Context Context.

Try it: