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

What one loop iteration did. More...

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

Public Member Functions

bool updated () const noexcept
 Tests whether any poll brought new data.

Public Attributes

std::chrono::system_clock::time_point at_ {}
 When the iteration ran.
std::vector< std::pair< PollKind, PollOutcome > > polls_
 What each poll returned, in order.
std::optional< strategy::HaltReason > gate_
 The hold that blocked placements, if any.
bool fed_ {false}
 Whether any poll returned UPDATED: something was fed to the runner or installed in it.
strategy::MarketPhase phase_ {strategy::MarketPhase::UNKNOWN}
 The market phase the loop computed.
bool phase_changed_ {false}
 Whether a phase change was announced to the strategy.

Detailed Description

What one loop iteration did.

Definition at line 532 of file loop.hpp.

Member Function Documentation

◆ updated()

bool algotradelib::runner::IterationReport::updated ( ) const
inlinenoexcept

Tests whether any poll brought new data.

Returns
true if any poll was UPDATED.

Definition at line 560 of file loop.hpp.

Member Data Documentation

◆ at_

std::chrono::system_clock::time_point algotradelib::runner::IterationReport::at_ {}

When the iteration ran.

Definition at line 534 of file loop.hpp.

◆ fed_

bool algotradelib::runner::IterationReport::fed_ {false}

Whether any poll returned UPDATED: something was fed to the runner or installed in it.

Definition at line 545 of file loop.hpp.

◆ gate_

std::optional<strategy::HaltReason> algotradelib::runner::IterationReport::gate_

The hold that blocked placements, if any.

A named cancellation may still have gone out under a hold that only means data is missing (strategy::halt_blocks).

Definition at line 543 of file loop.hpp.

◆ phase_

strategy::MarketPhase algotradelib::runner::IterationReport::phase_ {strategy::MarketPhase::UNKNOWN}

The market phase the loop computed.

Under the default limits, UNKNOWN means every placement that would open or increase a position was refused (closing ones are still allowed).

Definition at line 552 of file loop.hpp.

◆ phase_changed_

bool algotradelib::runner::IterationReport::phase_changed_ {false}

Whether a phase change was announced to the strategy.

Definition at line 554 of file loop.hpp.

◆ polls_

std::vector<std::pair<PollKind, PollOutcome> > algotradelib::runner::IterationReport::polls_

What each poll returned, in order.

Definition at line 536 of file loop.hpp.

Referenced by updated().


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