Constructors

Methods

  • Bucket-start (bar-open) time for a tick, aligned to the session anchor.

    Parameters

    • time: number

    Returns number

  • Whether the current bar is provisional; see CandleUpdate.provisional.

    Returns boolean

  • Adopt an authoritative bar for the current bucket, typically the broker's history for the bar that is still forming.

    A provisional bar takes the authoritative open, because its own is the first tick this builder happened to see. Every bar takes the union of the extremes, since both sides observed real prices, and the larger volume, since volume inside a bar only grows. The close stays with the ticks: a history snapshot was taken before the request went out, and a price that jumps backwards on every repair is the one thing a live chart must not do.

    Returns the reconciled bar, or null when the builder holds no bar for that bucket, in which case the caller decides whether to seed instead.

    Parameters

    • authoritative: Bar

    Returns null | Bar

  • Seed with the last historical bar so the first live tick continues it.

    Parameters

    • lastBar: Bar
    • OptionalcumDayVolumeSoFar: number

    Returns void