Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Indicator<T>

Creates a indicator that can be calculated over a dataset.

Type parameters

  • T

Hierarchy

  • Indicator

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • Creates an indicator with definition and configuration.

    Parameters

    • name: string

      Name of the indicator.

    • calculate: (dataset: Dataset) => number

      Indicator definition function that accepts the Dataset and returns a number.

        • Parameters

          Returns number

    • Optional options: IndicatorOptions<T>

      Indicator configuration object.

    Returns Indicator

Properties

Protected _calculate

_calculate: (dataset: Dataset) => number

Type declaration

    • Parameters

      Returns number

Protected _name

_name: string

Protected Optional _options

_options: IndicatorOptions<T>

Accessors

name

  • get name(): string

options

params

  • get params(): undefined | T

Methods

calculate

  • calculate(dataset: Dataset): number

spread

  • Mutates each quote of the given dataset with a calculated indicator value.

    Parameters

    Returns Dataset

    Mutated Dataset.

Generated using TypeDoc