![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The bars of one instrument and interval, oldest first. More...
#include <algotradelib/src/core/market_data.hpp>
Public Member Functions | |
| bool | ascending () const |
| Tests whether the bars are strictly ascending in time. | |
Public Attributes | |
| InstrumentId | instrument_ |
| The instrument. | |
| BarInterval | interval_ {BarInterval::ONE_DAY} |
| The period each bar covers. | |
| BarStamp | stamp_ {BarStamp::CLOSE} |
| Which edge of its period each bar's timestamp marks. | |
| Currency | currency_ |
| The currency of the prices. | |
| bool | adjusted_ {true} |
| Whether the prices are adjusted for corporate actions. | |
| std::vector< Bar > | bars_ |
| The bars, oldest first. | |
| std::optional< std::string > | next_cursor_ |
| A cursor to continue from, if the broker has more. | |
| std::chrono::system_clock::time_point | received_at_ |
| When the series was received, on this machine's clock. | |
The bars of one instrument and interval, oldest first.
Adapters reverse the brokers' newest-first order, so bars are ascending in time.
Definition at line 151 of file market_data.hpp.
|
inline |
Tests whether the bars are strictly ascending in time.
Definition at line 182 of file market_data.hpp.
| bool algotradelib::BarSeries::adjusted_ {true} |
Whether the prices are adjusted for corporate actions.
Definition at line 161 of file market_data.hpp.
| std::vector<Bar> algotradelib::BarSeries::bars_ |
The bars, oldest first.
There can be fewer than BarQuery::count_: paging stops on an empty page or when the page budget is spent. Use the size.
Definition at line 168 of file market_data.hpp.
Referenced by ascending(), and algotradelib::analytics::from_bars().
| Currency algotradelib::BarSeries::currency_ |
The currency of the prices.
Definition at line 159 of file market_data.hpp.
| InstrumentId algotradelib::BarSeries::instrument_ |
The instrument.
Definition at line 153 of file market_data.hpp.
Referenced by algotradelib::analytics::from_bars().
| BarInterval algotradelib::BarSeries::interval_ {BarInterval::ONE_DAY} |
The period each bar covers.
Definition at line 155 of file market_data.hpp.
| std::optional<std::string> algotradelib::BarSeries::next_cursor_ |
A cursor to continue from, if the broker has more.
A short series may still carry one; an empty or exhausted one carries none.
Definition at line 174 of file market_data.hpp.
| std::chrono::system_clock::time_point algotradelib::BarSeries::received_at_ |
When the series was received, on this machine's clock.
Definition at line 176 of file market_data.hpp.
| BarStamp algotradelib::BarSeries::stamp_ {BarStamp::CLOSE} |
Which edge of its period each bar's timestamp marks.
Definition at line 157 of file market_data.hpp.