AnyChart
API Reference
Still have questions?
Contact support
Top

namespace anychart.math.trix Improve this Doc

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

Functions Overview

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

Typedefs Overview

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

Functions Description

calculate

TRIX calculation.

Params:

NameTypeDescription
contextanychart.math.trix.ContextContext.
valuenumberValue.

Returns:

Array.<number> - The calculated TRIX indicator array of values.

calculationFunction

createComputer

Creates TRIX computer for the given table mapping.

Params:

NameTypeDefaultDescription
mappinganychart.data.TableMapping
Data mapping.
periodnumber
15
Moving Average period.
signalPeriodnumber
9
Signal Moving Average period.
maTypestring | anychart.enums.MovingAverageType
'ema'
Indicator smoothing type.
signalMaTypestring | anychart.enums.MovingAverageType
'ema'
Signal smoothing type.

Returns:

anychart.data.TableComputer - Table computer.

initContext

Creates context for TRIX indicator calculation.

Params:

NameTypeDefaultDescription
periodnumber
15
Indicator period.
signalPeriodnumber
9
Signal indicator period.
maTypestring | anychart.enums.MovingAverageType
'ema'
Indicator smoothing type.
signalMaTypestring | anychart.enums.MovingAverageType
'ema'
Signal smoothing type.

Returns:

anychart.math.trix.Context - Context.

startFunction

Start calculation function for TRIX indicator calculation.

Params:

NameTypeDescription
contextanychart.math.trix.ContextContext.