Class
caplin.chart.study

ExponentialMovingAverage

The class is still in Beta and is subject to API changes.
Implements caplin.chart.Study.
A study that calculates the exponential moving average over the given period.

This study only requires the options defined by caplin.chart.Study.

This study is aliased by the caplin.chart-ema-study alias. To create a new instance of this study use the caplin.chart.study.Factory.

Constructor Summary

Attributes Name and Description
caplin.chart.study.ExponentialMovingAverage( mOptions, oListener, oEmitter)

Constructs a new caplin.chart.study.ExponentialMovingAverage.

Method Summary

Attributes Name and Description
void evaluate( pData)

Calculates the simple exponential average over the given period.

String getAlias()

Gets the study's alias name

Methods implemented from class caplin.chart.Study:
enqueue, getConfiguration, getDisplayName, getId, getRepresentationNames, getRepresentationTypes

Constructor Detail

caplin.chart.study.ExponentialMovingAverage( mOptions, oListener, oEmitter)

Constructs a new caplin.chart.study.ExponentialMovingAverage.

Parameters
mOptions
oListener
oEmitter

Method Detail

void evaluate( pData)

Calculates the simple exponential average over the given period.

Once completed it will invoke the caplin.chart.study.StudyListener#onStudyData method on it's listener.

The format of the calculated data is [[timestamp, value], [timestamp, value], ...].

Parameters
pData
See
caplin.chart.Study

String getAlias()

Gets the study's alias name

Returns
{String} The alias for the study
See
caplin.chart.Study