Caplin Trader 4.0.3

Class: module:caplin/chart/study/Volume

module:caplin/chart/study/Volume

Constructor

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

Constructs a new caplin.chart.study.Volume. A study that extracts the volume data from inbound series data.

This study requires no derivation options. By default it will use the `volume` field as the value for calculating the study data. If you require a different field, set a `field` property in the derivation options. See module:caplin/chart/series/Fields for details.

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

Parameters:
Name Type Attributes Description
alias Object 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 and isolate options.
Implements:

Methods

evaluate(data)

Extracts the volume data from the inbound series data.

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

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

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