AnyChart
API Reference
Still have questions?
Contact support
Top
You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.

namespace anychart.math.macd Improve this Doc

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

Functions Overview

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

Typedefs Overview

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

Functions Description

calculate

MACD calculation.

Params:

NameTypeDescription
contextanychart.math.macd.ContextMACD context.
valuenumberValue.

Returns:

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

calculationFunction

Calculates MACD.

Params:

NameTypeDescription
rowanychart.data.TableComputer.RowProxyRow proxy.
contextanychart.math.macd.ContextContext.

createComputer

Creates a MACD computer for the given table mapping.

Params:

NameTypeDescription
mappinganychart.data.TableMappingData mapping.
fastPeriodnumberFast indicator period.
slowPeriodnumberSlow indicator period.
signalPeriodnumberSignal indicator period.

Returns:

anychart.data.TableComputer - Table computer.

initContext

Creates a context for MACD indicator calculation.

Params:

NameTypeDefaultDescription
fastPeriodnumber
12
Fast indicator period.
slowPeriodnumber
26
Slow indicator period.
signalPeriodnumber
9
Signal indicator period.

Returns:

anychart.math.macd.Context - Context.

startFunction

Start calculation function for MACD indicator calculation.

Params:

NameTypeDescription
contextanychart.math.macd.ContextContext.