Caplin Trader 4.7.1

Class: module:caplin/chart/study/BollingerBand

module:caplin/chart/study/BollingerBand

Constructor

new module:caplin/chart/study/BollingerBand(alias, derivationParams, listener, configOverridesopt)

Constructs a new 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 module:caplin/chart/study/Factory.

Parameters:
Name Type Attributes Description
alias String The Study alias.
derivationParams Object Study derivation options.
listener Object A listener object that implements the module:caplin/chart/study/StudyListener interface.
configOverrides Object <optional>
Configuration overrides passed to the parent class. This study overrides the representationTypes, representationNames and colors options.
Implements:

Methods

evaluate(data)

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

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

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

Parameters:
Name Type Description
data Array Chart series data in the Caplin Format.
See: