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

Detects whether a source declares static constexpr bool reports_buying_power = true, meaning its broker reports buying power (BrokerCaps::has_buying_power). More...

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

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

Detailed Description

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

Detects whether a source declares static constexpr bool reports_buying_power = true, meaning its broker reports buying power (BrokerCaps::has_buying_power).

false when undeclared, as for a broker that reports none: PollingLoop then holds every placement as strategy::HaltReason::BUYING_POWER_UNREAD unless strategy::RiskLimits::run_budget_ is set, and also with one while strategy::RiskLimits::enforce_buying_power_ is on (no reading will arrive), with a note naming the missing declaration. live::SessionSource declares it; a source that wraps one by composition must forward the constant.

Template Parameters
SourceThe source type.

Definition at line 314 of file loop.hpp.


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