algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::runner::source_states_calendar_sessions< Source, typename > Struct Template Reference

Detects whether a source declares static constexpr bool states_calendar_sessions = true, meaning the calendar it installs carries the session hours the adapter fills (BrokerCaps::has_calendar_sessions). More...

#include <algotradelib/src/runner/loop.hpp>

Inheritance diagram for algotradelib::runner::source_states_calendar_sessions< Source, typename >:
Collaboration diagram for algotradelib::runner::source_states_calendar_sessions< Source, typename >:

Detailed Description

template<typename Source, typename = void>
struct algotradelib::runner::source_states_calendar_sessions< Source, typename >

Detects whether a source declares static constexpr bool states_calendar_sessions = true, meaning the calendar it installs carries the session hours the adapter fills (BrokerCaps::has_calendar_sessions).

false when undeclared. PollingLoop then takes the market phase from strategy::stated_session_phase for a declaring source, and from its SessionWindow otherwise. A source that wraps a live::SessionSource by composition must forward the constant: if an undeclared source installs a calendar whose open days carry TradingDay::regular_, the loop refuses to guess and the phase is UNKNOWN. It cannot see a declaring broker whose hours all failed to parse, which an undeclared source still runs on the window.

Template Parameters
SourceThe source type.

Definition at line 295 of file loop.hpp.


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