namespace anychart.math.stochastic Improve this Doc
Namespace anychart.math.stochastic
Learn more about indicator mathematics.
Functions Overview
| calculate() | Stochastic calculation. |
| calculationFunction() | Calculates Stochastic. |
| createComputer() | Creates a Stochastic computer for the given table mapping. |
| initContext() | Creates a context for Stochastic indicator calculation. |
| startFunction() | Start calculation function for Stochastic indicator calculation. |
Typedefs Overview
| anychart.math.stochastic.Context | Type definition for the context. |
Functions Description
calculate
Stochastic calculation.
Params:
| Name | Type | Description |
|---|---|---|
| context | Object | Stochastic context. |
| closeValue | number | Close value. |
| highValue | number | High value. |
| lowValue | number | Low value. |
Returns:
Array.<number> - An array of the calculated Stochastic indicator values.calculationFunction
Calculates Stochastic.
Params:
| Name | Type | Description |
|---|---|---|
| row | anychart.data.TableComputer.RowProxy | Row proxy. |
| context | anychart.math.stochastic.Context | Context. |
Try it:
createComputer
Creates a Stochastic 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 | 1 | Indicator %K smoothing period. |
| dPeriod | number | 3 | Indicator %D period. |
| kMAType | anychart.enums.MovingAverageType | string | SMA | Indicator %K smoothing type. |
| dMAType | anychart.enums.MovingAverageType | string | SMA | Indicator %D smoothing type. |
Returns:
anychart.data.TableComputer - Table computer.Try it:
initContext
Creates a context for Stochastic indicator calculation.
Params:
| Name | Type | Default | Description |
|---|---|---|---|
| kPeriod | number | 14 | Indicator %K period. |
| kMAPeriod | number | 1 | Indicator %K smoothing period. |
| dPeriod | number | 3 | Indicator D period. Defaults to 3. |
| kMAType | anychart.enums.MovingAverageType | string | "sma" | Indicator %K smoothing type. |
| dMAType | anychart.enums.MovingAverageType | string | "sma" | Indicator %D smoothing type. |
Returns:
anychart.math.stochastic.Context - Context.Try it:
startFunction
Start calculation function for Stochastic indicator calculation.
Params:
| Name | Type | Description |
|---|---|---|
| context | anychart.math.stochastic.Context | Context. |
Try it:
