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

One bar, delivered to on_bar. More...

#include <algotradelib/src/strategy/event.hpp>

Collaboration diagram for algotradelib::runner::BarEvent:

Public Attributes

InstrumentId instrument_
 The instrument the bar is for.
BarInterval interval_ {BarInterval::ONE_DAY}
 The period length the bar covers.
BarStamp stamp_ {BarStamp::CLOSE}
 Whether bar_.timestamp_ marks the period's open or close.
Bar bar_
 The bar.
std::chrono::system_clock::time_point period_end_ {}
 When the bar's period ended: the earliest moment the bar could be known.

Detailed Description

One bar, delivered to on_bar.

interval_ and stamp_ say which period the bar covers; period_end_ is the instant that period ended, the earliest moment the bar could be known. See bar_ for which bars a live source may deliver while still forming.

Definition at line 202 of file event.hpp.

Member Data Documentation

◆ bar_

The bar.

Note
Live, live::SessionSource holds back a daily or minute bar whose period has not ended, such as the broker's row for the current session. Weekly, monthly and yearly bars stamped at their open are delivered as read and may still be forming.

Definition at line 216 of file event.hpp.

◆ instrument_

The instrument the bar is for.

Definition at line 204 of file event.hpp.

◆ interval_

The period length the bar covers.

Definition at line 206 of file event.hpp.

◆ period_end_

std::chrono::system_clock::time_point algotradelib::strategy::BarEvent::period_end_ {}

When the bar's period ended: the earliest moment the bar could be known.

Definition at line 218 of file event.hpp.

◆ stamp_

Whether bar_.timestamp_ marks the period's open or close.

Definition at line 208 of file event.hpp.


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