Top

namespace anychart.math.atr Improve this Doc

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

Functions Overview

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

Typedefs Overview

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

Functions Description

calculate

ATR calculation.

Params:

Name Type Description
context anychart.math.atr.Context ATR context.
close number Close value.
high number High value.
low number Low value.

Returns:

number - The calculated ATR indicator value.

calculationFunction

Calculates ATR.

Params:

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

Try it:

createComputer

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

Params:

Name Type Default Description
period number
14
Indicator period.

Returns:

anychart.math.atr.Context - Context.

Try it:

startFunction

Start calculation function for ATR indicator calculation.

Params:

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

Try it: