Hierarchy (View Summary)

Constructors

  • The Data object manages and controls multiple BG.charts.Buffer objects.

    It also offers additional features such as calculating indicators (using BG.charts.Indicator) on arbitrary buffers.

    Returns BG.charts.Data

Methods

  • Type Parameters

    • Type extends "update"
    • Callback extends (update: TUpdate) => void

    Parameters

    Returns this

    adds a listener to the end of the listeners array for the specified event.

  • Type Parameters

    • Type extends "update"
    • Callback extends (update: TUpdate) => void

    Parameters

    Returns boolean

    execute each of the listeners in order with the supplied parameters.

  • returns value of requested config option

    firstIndex first index for which there are values in at least one buffer lastIndex last index for which there are values in at least one buffer startIndex first index in the current range. can be smaller than firstIndex endIndex last index in the current range. can be larger than lastIndex

    Parameters

    • v: "firstIndex" | "lastIndex" | "startIndex" | "endIndex"

    Returns number

  • returns the Buffer object with the specified handle

    Parameters

    • handle: number

      the handle of the requested buffer

    Returns null | Buffer

  • returns the identifier for the specified index

    Parameters

    • index: number

    Returns number

  • returns an array containing all identifiers

    Returns number[]

  • returns the index for the specified identifier

    if there are multiple occurences of the requested identifier, returns the first exact match if there is no exact match, returns the index of the last identifier that is smaller than the requested one

    Parameters

    • identifier: number

    Returns number

  • returns a list of candles that begin at the start of the intervals of size as dictate by the tickT function

    Parameters

    • interval: ESpans

      the size of the interval in milliseconds

    Returns number[]

  • returns the numeric offset for the specified index will only be non-zero if the timestamp at the specified index is not distinct

    offset should be used in combination with the return value of getIdentifierByIndex

    Parameters

    • index: number

      an index

    Returns number

    numeric offset

  • checks if data is empty

    Returns boolean

  • checks if a update is currently active

    Returns boolean

  • Type Parameters

    • Type extends "update"
    • Callback extends (update: TUpdate) => void

    Parameters

    Returns this

    adds a one time listener for the event. This listener is invoked only the next time the event is fired, after which it is removed.

  • Type Parameters

    • Type extends "update"

    Parameters

    Returns this

    removes all listeners, or those of the specified event.

  • Type Parameters

    • Type extends "update"
    • Callback extends (update: TUpdate) => void

    Parameters

    Returns this

    remove a listener from the listener array for the specified event.

  • Parameters

    • maxListeners: number

    Returns this

    by default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that limit to be increased. Set to zero for unlimited.

  • zooms in/out to the specified span

    Parameters

    • startIndex: number

      first index of the new span

    • endIndex: number

      last index of the new span

    Returns boolean

  • Parameters

    • cb: Function

    Returns void

    set custom error handler for event listeners

  • Parameters

    • maxListeners: number

    Returns void

    set default amount for limit warning