Class
caplin.chart.study

BollingerBand

A study that calculates the Bollinger Bands over the given period with upper and lower bands at n standard deviations.

This study requires the period and stdDeviationMultiplier to be passed in the derivation options.

This study is aliased by the caplin.chart-bollinger-bands-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.BollingerBand(String sAlias, Object mDerivationParams, Object oListener, Object mConfigOverrides)

Constructs a new caplin.chart.study.BollingerBand.

Method Summary

Attributes Name and Description
void evaluate(Array pData)

Calculates the Bollinger Bands over the given period against the provided standard deviation multiplier.

Methods implemented from class caplin.chart.Study:
enqueue, getAlias, getColor, getColors, getConfigValue, getDerivationParam, getDerivationParams, getDisplayName, getId, getRepresentationNames, getRepresentationTypes, serialize
Methods implemented from class caplin.chart.study.StudyListener:
onStudyData

Constructor Detail

caplin.chart.study.BollingerBand(String sAlias, Object mDerivationParams, Object oListener, Object mConfigOverrides)

Constructs a new caplin.chart.study.BollingerBand.

Parameters
String sAlias The Study alias.
Object mDerivationParams Study derivation options.
Object oListener A listener object that implements the caplin.chart.study.StudyListener interface.
Object mConfigOverrides (optional) Configuration overrides passed to the parent class. This study overrides the representationTypes, representationNames and colors options.

Method Detail

void evaluate(Array pData)

Calculates the Bollinger Bands over the given period against the provided standard deviation multiplier.

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

The format of the calculated data is: [[timestamp, upper, middle, lower], ...]

Parameters
Array pData Chart series data in the Caplin Format.
See
caplin.chart.Study