algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::runner::RecordingExecutor< BrokerTag > Class Template Reference

An executor that sends nothing and records what it was given (the dry run's default). More...

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

Inheritance diagram for algotradelib::runner::RecordingExecutor< BrokerTag >:

Public Member Functions

SendOutcome place (const strategy::PlannedOrder &order)
 Records a placement.
SendOutcome cancel (const WorkingOrder< BrokerTag > &working)
 Records a cancellation.
const std::vector< strategy::PlannedOrder > & placed () const noexcept
 Returns every placement recorded.
const std::vector< OrderRef< BrokerTag > > & canceled () const noexcept
 Returns every cancellation recorded.

Static Public Attributes

static constexpr bool reaches_a_broker = false
 false: a dry run reaches no broker, so the runner does not require a read account.

Detailed Description

template<typename BrokerTag>
class algotradelib::runner::RecordingExecutor< BrokerTag >

An executor that sends nothing and records what it was given (the dry run's default).

Every instruction is ACCEPTED.

Template Parameters
BrokerTagThe broker tag.

Definition at line 612 of file execution.hpp.

Member Function Documentation

◆ cancel()

template<typename BrokerTag>
SendOutcome algotradelib::runner::RecordingExecutor< BrokerTag >::cancel ( const WorkingOrder< BrokerTag > & working)
inline

Records a cancellation.

Parameters
workingThe order.
Returns
ACCEPTED.

Definition at line 632 of file execution.hpp.

◆ canceled()

template<typename BrokerTag>
const std::vector< OrderRef< BrokerTag > > & algotradelib::runner::RecordingExecutor< BrokerTag >::canceled ( ) const
inlinenoexcept

Returns every cancellation recorded.

Returns
The references, in order.

Definition at line 647 of file execution.hpp.

◆ place()

template<typename BrokerTag>
SendOutcome algotradelib::runner::RecordingExecutor< BrokerTag >::place ( const strategy::PlannedOrder & order)
inline

Records a placement.

Parameters
orderThe order.
Returns
ACCEPTED.

Definition at line 622 of file execution.hpp.

◆ placed()

template<typename BrokerTag>
const std::vector< strategy::PlannedOrder > & algotradelib::runner::RecordingExecutor< BrokerTag >::placed ( ) const
inlinenoexcept

Returns every placement recorded.

Returns
The orders, in order.

Definition at line 641 of file execution.hpp.

Member Data Documentation

◆ reaches_a_broker

template<typename BrokerTag>
bool algotradelib::runner::RecordingExecutor< BrokerTag >::reaches_a_broker = false
staticconstexpr

false: a dry run reaches no broker, so the runner does not require a read account.

Definition at line 616 of file execution.hpp.


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