Skip to content
EliteChart

Bar

Documentation


Documentation / @elitechart/elitechart / Bar

Defined in: core/dist/index.d.ts:143

An OHLCV bar at a fixed resolution. Every field is a branded primitive so accidental scalar swaps are impossible.

Example

code
import { asPrice, asTimestampMs, asVolume, type Bar } from '@elitechart/core';
const bar: Bar = {
  time: asTimestampMs(Date.UTC(2026, 0, 1)),
  open: asPrice(67_400),
  high: asPrice(67_550),
  low: asPrice(67_320),
  close: asPrice(67_500),
  volume: asVolume(1_240),
};

Properties

close

code
readonly close: Price;

Defined in: core/dist/index.d.ts:148


high

code
readonly high: Price;

Defined in: core/dist/index.d.ts:146


low

code
readonly low: Price;

Defined in: core/dist/index.d.ts:147


open

code
readonly open: Price;

Defined in: core/dist/index.d.ts:145


time

code
readonly time: TimestampMs;

Defined in: core/dist/index.d.ts:144


volume

code
readonly volume: Volume;

Defined in: core/dist/index.d.ts:149