Skip to content

Bar Fields

BarField

Bases: Enum

Enumeration of data fields in OHLCV bars of market data.

Value Semantics
OPEN Bar's opening value.
HIGH Bar's highest value.
LOW Bar's lowest value.
CLOSE Bar's closing value.
VOLUME Bar's traded volume.
Source code in src/onesecondtrader/models/bar_fields.py
class BarField(enum.Enum):
    """
    Enumeration of data fields in OHLCV bars of market data.

    | Value    | Semantics                          |
    |----------|------------------------------------|
    | `OPEN`   | Bar's opening value.               |
    | `HIGH`   | Bar's highest value.               |
    | `LOW`    | Bar's lowest value.                |
    | `CLOSE`  | Bar's closing value.               |
    | `VOLUME` | Bar's traded volume.               |
    """

    OPEN = enum.auto()
    HIGH = enum.auto()
    LOW = enum.auto()
    CLOSE = enum.auto()

    VOLUME = enum.auto()