![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
One order a replay accepted and has not yet filled or withdrawn. More...
#include <algotradelib/src/backtest/engine.hpp>
Public Attributes | |
| strategy::PlannedOrder | order_ |
| The order as reconciliation planned it. | |
| OrderRef< BrokerTag > | ref_ |
| The reference the replay issued for it. | |
| std::uint64_t | accepted_on_ {0} |
| The bar it was accepted during; it cannot fill against that bar. | |
| std::optional< std::chrono::system_clock::time_point > | decided_at_ |
| When the strategy decided the order, if known. | |
| bool | decision_is_exact_ {true} |
| Whether decided_at_ is enforced strictly, or only a nominal upper bound (the period end of an open-stamped daily or longer bar). | |
| bool | released_ {false} |
| Whether a stop-limit order has been released, so it now rests as its limit. | |
| std::optional< Date > | session_ |
| The market-local date of the session a DAY order lives in, once known (the date of the first bar it could trade against); Backtester withdraws it when that session ends. | |
One order a replay accepted and has not yet filled or withdrawn.
| BrokerTag | The order-reference tag. |
Definition at line 39 of file engine.hpp.
| std::uint64_t algotradelib::backtest::QueuedOrder< BrokerTag >::accepted_on_ {0} |
The bar it was accepted during; it cannot fill against that bar.
Definition at line 45 of file engine.hpp.
Referenced by algotradelib::backtest::QueueingExecutor< Tag >::place().
| std::optional<std::chrono::system_clock::time_point> algotradelib::backtest::QueuedOrder< BrokerTag >::decided_at_ |
When the strategy decided the order, if known.
Where the engine knows when a bar's period began and this instant is exact, the order may fill only against a bar whose period began at or after it (so a decision at 10:30 is not filled at that day's 09:00 open). A nominal instant (decision_is_exact_ false) is an upper bound: a start at or after it still proves the order came first, while an earlier start is allowed and counted in ReplayResult::unchecked_fill_causality_. Empty (an order placed by a caller driving the executor directly) is always eligible.
Definition at line 56 of file engine.hpp.
Referenced by algotradelib::backtest::QueueingExecutor< Tag >::place().
| bool algotradelib::backtest::QueuedOrder< BrokerTag >::decision_is_exact_ {true} |
Whether decided_at_ is enforced strictly, or only a nominal upper bound (the period end of an open-stamped daily or longer bar).
Strict for every intraday bar, including a session's last one cut short by the close, whose derived end is late rather than exact: a late bound defers a fill and never credits an earlier price.
Definition at line 64 of file engine.hpp.
Referenced by algotradelib::backtest::QueueingExecutor< Tag >::place().
| strategy::PlannedOrder algotradelib::backtest::QueuedOrder< BrokerTag >::order_ |
The order as reconciliation planned it.
Definition at line 41 of file engine.hpp.
Referenced by algotradelib::backtest::QueueingExecutor< Tag >::place().
| OrderRef<BrokerTag> algotradelib::backtest::QueuedOrder< BrokerTag >::ref_ |
The reference the replay issued for it.
Definition at line 43 of file engine.hpp.
Referenced by algotradelib::backtest::QueueingExecutor< Tag >::place().
| bool algotradelib::backtest::QueuedOrder< BrokerTag >::released_ {false} |
Whether a stop-limit order has been released, so it now rests as its limit.
The order itself (and the strategy's working row) still reads as a stop, as a live listing does.
Definition at line 70 of file engine.hpp.
| std::optional<Date> algotradelib::backtest::QueuedOrder< BrokerTag >::session_ |
The market-local date of the session a DAY order lives in, once known (the date of the first bar it could trade against); Backtester withdraws it when that session ends.
Definition at line 75 of file engine.hpp.