Sending and managing orders
In Chapter, Designing Our Trading Ecosystem, we discussed the purpose of the trading system’s order manager component (the Designing a framework for low-latency C++ trading algorithms section). In this section, we will implement an OrderManager
class to encapsulate the order management logic inside this class and thus make it easy for trading strategies to manage their orders. Before we build the OrderManager
class itself, we will need to define a basic building block called the OMOrder
structure.
Defining the OMOrder struct and its related types
In this first subsection, we will define some enumerations and types to be used in the OrderManager
class and its sub-components. All the source code for this subsection is in the Chapter9/trading/strategy/om_order.h
source file on GitHub.
First, we must provide the include
files that the om_order.h
file needs:
#pragma once #include <array> #include <sstream> #include "common...