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

namespace anychart.math.bbands Improve this Doc

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

Functions Overview

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

Typedefs Overview

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

Functions Description

calculate

Bollinger Bands calculation.

Params:

Name Type Description
context anychart.math.bbands.Context BBands Width context.
value number Value.

Returns:

Array.<number> - An array of the calculated Bollinger Bands indicator values.

calculationFunction

Calculates Bollinger Bands.

Params:

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

Try it:

createComputer

Creates the Bollinger Bands computer for the given table mapping.

Params:

Name Type Description
mapping anychart.data.TableMapping Data mapping.
period number Indicator period.
deviation number Indicator deviation.

Returns:

anychart.data.TableComputer - Table computer

Try it:

initContext

Creates a context for the Bollinger Bands indicator calculation.

Params:

Name Type Default Description
period number
20
Indicator period.
deviation number
2
Indicator deviation.

Returns:

anychart.math.bbands.Context - Context.

Try it:

startFunction

Start calculation function for the Bollinger Bands indicator calculation.

Params:

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

Try it: