algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::Bar Struct Reference

One bar: the prices and volume of one period, as exact decimals. More...

#include <algotradelib/src/core/market_data.hpp>

Collaboration diagram for algotradelib::Bar:

Public Attributes

std::chrono::system_clock::time_point timestamp_
 The instant marking the period; BarSeries::stamp_ says which edge.
std::optional< Decimal64 > open_
 The first trade's price; empty if nothing traded in the period (never zero or the previous close).
Decimal64 high_
 The highest trade price.
Decimal64 low_
 The lowest trade price.
Decimal64 close_
 The last trade price.
Decimal64 volume_
 The shares traded.
std::optional< Decimal64 > traded_value_
 The value traded, if the broker publishes it.

Detailed Description

One bar: the prices and volume of one period, as exact decimals.

The interval, stamp convention and currency are on the BarSeries.

Definition at line 129 of file market_data.hpp.

Member Data Documentation

◆ close_

◆ high_

Decimal64 algotradelib::Bar::high_

The highest trade price.

Definition at line 135 of file market_data.hpp.

Referenced by algotradelib::backtest::NextBarFillModel::decide().

◆ low_

Decimal64 algotradelib::Bar::low_

The lowest trade price.

Definition at line 137 of file market_data.hpp.

Referenced by algotradelib::backtest::NextBarFillModel::decide().

◆ open_

std::optional<Decimal64> algotradelib::Bar::open_

The first trade's price; empty if nothing traded in the period (never zero or the previous close).

Definition at line 133 of file market_data.hpp.

Referenced by algotradelib::backtest::NextBarFillModel::decide().

◆ timestamp_

std::chrono::system_clock::time_point algotradelib::Bar::timestamp_

The instant marking the period; BarSeries::stamp_ says which edge.

Definition at line 131 of file market_data.hpp.

◆ traded_value_

std::optional<Decimal64> algotradelib::Bar::traded_value_

The value traded, if the broker publishes it.

Definition at line 143 of file market_data.hpp.

◆ volume_

Decimal64 algotradelib::Bar::volume_

The shares traded.

Definition at line 141 of file market_data.hpp.


The documentation for this struct was generated from the following file: