![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
One order the runner is to place. More...
#include <algotradelib/src/strategy/reconcile.hpp>
Public Attributes | |
| InstrumentId | instrument_ |
| The instrument to trade. | |
| OrderSide | side_ {OrderSide::BUY} |
| The side. | |
| OrderType | type_ {OrderType::LIMIT} |
| The order type. | |
| TimeInForce | time_in_force_ {TimeInForce::DAY} |
| How long the order stays valid. | |
| OrderSession | session_ {OrderSession::REGULAR} |
| The trading session. | |
| Venue | venue_ {Venue::UNSPECIFIED} |
| Where to route the order; see OrderRequest::venue_. | |
| Decimal64 | quantity_ |
| The quantity, after rounding onto the lot. | |
| std::optional< Decimal64 > | price_ |
| The limit price, after clamping and rounding; empty for a market order. | |
| std::optional< Decimal64 > | trigger_price_ |
| The trigger price of a STOP_LIMIT order, exactly as stated; empty otherwise. | |
| std::string | tag_ |
| The tag of the intent or target the order came from. | |
| std::optional< std::string > | client_order_id_ |
| The idempotency key, if the intent carried one. | |
| bool | price_rounded_ {false} |
| Whether the price was rounded onto the tick grid. | |
| bool | price_clamped_ {false} |
| Whether the price was clamped to the day's band (an aggressive limit beyond it). | |
| bool | price_would_have_been_clamped_ {false} |
| Whether a price band was known but not applied (too old), and would have clamped this price. | |
| bool | quantity_rounded_ {false} |
| Whether the quantity was rounded down onto the lot. | |
One order the runner is to place.
The price_rounded_, price_clamped_ and quantity_rounded_ flags say what reconciliation changed from what the strategy asked for.
Definition at line 149 of file reconcile.hpp.
| std::optional<std::string> algotradelib::strategy::PlannedOrder::client_order_id_ |
The idempotency key, if the intent carried one.
Definition at line 175 of file reconcile.hpp.
Referenced by algotradelib::live::SessionExecutor< Session >::place(), and algotradelib::strategy::reconcile().
| InstrumentId algotradelib::strategy::PlannedOrder::instrument_ |
The instrument to trade.
Definition at line 151 of file reconcile.hpp.
Referenced by algotradelib::strategy::closes_toward_flat(), algotradelib::backtest::NextBarFillModel::decide(), algotradelib::strategy::RiskGuard::evaluate(), algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), algotradelib::strategy::projected_gross_exposure(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| std::optional<Decimal64> algotradelib::strategy::PlannedOrder::price_ |
The limit price, after clamping and rounding; empty for a market order.
Definition at line 169 of file reconcile.hpp.
Referenced by algotradelib::backtest::NextBarFillModel::decide(), algotradelib::strategy::RiskGuard::evaluate(), algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), algotradelib::strategy::projected_gross_exposure(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| bool algotradelib::strategy::PlannedOrder::price_clamped_ {false} |
Whether the price was clamped to the day's band (an aggressive limit beyond it).
Definition at line 180 of file reconcile.hpp.
Referenced by algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| bool algotradelib::strategy::PlannedOrder::price_rounded_ {false} |
Whether the price was rounded onto the tick grid.
Definition at line 178 of file reconcile.hpp.
Referenced by algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| bool algotradelib::strategy::PlannedOrder::price_would_have_been_clamped_ {false} |
Whether a price band was known but not applied (too old), and would have clamped this price.
Set by runner::Runner, not by reconciliation; see Runner::set_maximum_price_limits_age.
Definition at line 187 of file reconcile.hpp.
| Decimal64 algotradelib::strategy::PlannedOrder::quantity_ |
The quantity, after rounding onto the lot.
Definition at line 167 of file reconcile.hpp.
Referenced by algotradelib::strategy::closes_toward_flat(), algotradelib::backtest::NextBarFillModel::decide(), algotradelib::strategy::RiskGuard::evaluate(), algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), algotradelib::strategy::projected_gross_exposure(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| bool algotradelib::strategy::PlannedOrder::quantity_rounded_ {false} |
Whether the quantity was rounded down onto the lot.
Definition at line 189 of file reconcile.hpp.
Referenced by algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| OrderSession algotradelib::strategy::PlannedOrder::session_ {OrderSession::REGULAR} |
The trading session.
Definition at line 159 of file reconcile.hpp.
Referenced by algotradelib::live::SessionExecutor< Session >::place(), and algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place().
| OrderSide algotradelib::strategy::PlannedOrder::side_ {OrderSide::BUY} |
The side.
Definition at line 153 of file reconcile.hpp.
Referenced by algotradelib::strategy::closes_toward_flat(), algotradelib::backtest::NextBarFillModel::decide(), algotradelib::strategy::RiskGuard::evaluate(), algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), algotradelib::strategy::projected_gross_exposure(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| std::string algotradelib::strategy::PlannedOrder::tag_ |
The tag of the intent or target the order came from.
Definition at line 173 of file reconcile.hpp.
Referenced by algotradelib::backtest::NextBarFillModel::decide(), algotradelib::strategy::RiskGuard::evaluate(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| TimeInForce algotradelib::strategy::PlannedOrder::time_in_force_ {TimeInForce::DAY} |
How long the order stays valid.
Definition at line 157 of file reconcile.hpp.
Referenced by algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| std::optional<Decimal64> algotradelib::strategy::PlannedOrder::trigger_price_ |
The trigger price of a STOP_LIMIT order, exactly as stated; empty otherwise.
Definition at line 171 of file reconcile.hpp.
Referenced by algotradelib::backtest::NextBarFillModel::decide(), algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), and algotradelib::strategy::reconcile().
| OrderType algotradelib::strategy::PlannedOrder::type_ {OrderType::LIMIT} |
The order type.
Definition at line 155 of file reconcile.hpp.
Referenced by algotradelib::backtest::NextBarFillModel::decide(), algotradelib::live::SessionExecutor< Session >::place(), algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::place(), algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| Venue algotradelib::strategy::PlannedOrder::venue_ {Venue::UNSPECIFIED} |
Where to route the order; see OrderRequest::venue_.
Strategies do not set it; a live runner fills in its binding's route before sending.
Definition at line 165 of file reconcile.hpp.
Referenced by algotradelib::live::SessionExecutor< Session >::place(), and algotradelib::runner::JournalingExecutor< Inner, Journal, Clock >::route_of().