![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
A source for tests: each poll returns a queued or default outcome, without any network. More...
#include <algotradelib/src/runner/loop.hpp>
Public Member Functions | |
| void | queue (PollKind kind, PollOutcome outcome) |
| Queues the outcome of the next poll of a kind. | |
| void | set_default (PollKind kind, PollOutcome outcome) |
| Sets the outcome of every unqueued poll of a kind (UNCHANGED by default). | |
| void | set_order_list (PollOutcome outcome) |
| Sets the outcome of the order-list read (UPDATED by default). | |
| void | set_buying_power_currencies (std::vector< Currency > currencies) |
| Sets the buying-power currencies the source claims to ask about. | |
| void | set_calendar (TradingCalendar calendar) |
| Sets the calendar a successful calendar poll installs, and makes that poll default to UPDATED. | |
| const std::vector< Currency > & | buying_power_currencies () const noexcept |
| Returns the buying-power currencies. | |
| std::size_t | order_list_reads () const noexcept |
| Returns how many times the order list was read. | |
| std::size_t | polls (PollKind kind) const noexcept |
| Returns how many times a kind was polled. | |
| void | set_price_limits (InstrumentId instrument, PriceLimits limits) |
| Adds a band a successful price-limits poll installs, and makes that poll default to UPDATED. | |
| PollOutcome | poll (PollKind kind, Runner &runner_instance) |
| Polls: returns the next queued outcome or the default, and on UPDATED installs the calendar or bands set for that kind. | |
| PollOutcome | read_order_list (Runner &) |
| Reads the order list: returns the configured outcome. The runner argument is ignored. | |
Static Public Attributes | |
| static constexpr bool | provides_working_orders = true |
| true: its outcomes stand for a real working-order listing. | |
A source for tests: each poll returns a queued or default outcome, without any network.
It installs a calendar only during PollKind::CALENDAR (see set_calendar), the rule every source must follow.
| Runner | The runner type. |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |