Top

namespace anychart.math.kdj Improve this Doc

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

Functions Overview

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

Typedefs Overview

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

Functions Description

calculate

KDJ calculation.

Params:

Name Type Description
context anychart.math.kdj.Context KDJ context.
closeValue number Close value.
highValue number High value.
lowValue number Low value.

Returns:

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

calculationFunction

Calculates KDJ.

Params:

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

Try it:

createComputer

Creates a KDJ computer for the given table mapping.

Params:

Name Type Default Description
mapping anychart.data.TableMapping
Data mapping.
kPeriod number
14
Indicator %K period.
kMAPeriod number
5
Indicator %K smoothing period.
dPeriod number
5
Indicator %D period.
kMAType anychart.enums.MovingAverageType
EMA
Indicator %K smoothing type.
dMAType anychart.enums.MovingAverageType
EMA
Indicator %D smoothing type.
kMultiplier number
-2
The %K multiplier to calculate the % J values.
dMultiplier number
3
The %D multiplier to calculate the % J values.

Returns:

anychart.data.TableComputer - Table computer.

Try it:

initContext

Creates a context for KDJ indicator calculation.

Params:

Name Type Default Description
kPeriod number
14
Indicator %K period.
kMAPeriod number
5
Indicator %K smoothing period.
dPeriod number
3
Indicator %D period.
kMAType anychart.enums.MovingAverageType
EMA
Indicator %K smoothing type.
dMAType anychart.enums.MovingAverageType
EMA
Indicator %D smoothing type.
kMultiplier number
-2
%K multiplier.
dMultiplier number
3
%D multiplier.

Returns:

anychart.math.kdj.Context - Context.

Try it:

startFunction

Start calculation function for KDJ indicator calculation.

Params:

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

Try it: