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

One order the runner is to place. More...

#include <algotradelib/src/strategy/reconcile.hpp>

Collaboration diagram for algotradelib::strategy::PlannedOrder:

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.

Detailed Description

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.

Member Data Documentation

◆ client_order_id_

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().

◆ instrument_

◆ price_

◆ price_clamped_

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().

◆ price_rounded_

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().

◆ price_would_have_been_clamped_

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.

◆ quantity_

◆ quantity_rounded_

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().

◆ session_

OrderSession algotradelib::strategy::PlannedOrder::session_ {OrderSession::REGULAR}

◆ side_

◆ tag_

std::string algotradelib::strategy::PlannedOrder::tag_

◆ time_in_force_

◆ trigger_price_

std::optional<Decimal64> algotradelib::strategy::PlannedOrder::trigger_price_

◆ type_

◆ venue_

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().


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