39 throw std::runtime_error(
"Threshold for tracking best bids "
40 "or offers can't be a negative value. ");
66 , threshold_(other.threshold_)
67 , enabled_(other.enabled_)
83 group_.controlAssignment(
"BBO Threshold Enable", enabled_, value);
98 if (0 <= value.mantissa())
100 group_.controlAssignment(
"BBO Threshold", threshold_, value);
142 threshold_ = other.threshold_;
143 enabled_ = other.enabled_;
183 : price_(other.price_)
205 return (price_.enabled());
232 return price_.group();
239 price_.assignNoControl(other.price_);
255 toStr(str, tracking);
279 : price_(other.price_)
280 , quantity_(other.quantity_)
314 return (price_.enabled() || quantity_.enabled());
349 return price_.group();
356 price_.assignNoControl(other.price_);
357 quantity_.assignNoControl(other.quantity_);
374 toStr(str, tracking);
387 , numberOfOrders_(
group)
399 , numberOfOrders_(other.numberOfOrders_)
409 return numberOfOrders_;
415 return numberOfOrders_;
429 || (numberOfOrders_.enabled()
459 numberOfOrders_.assignNoControl(other.numberOfOrders_);
475 toStr(str, tracking);
482template <
class BboTracking>
490 , bboTracking_(
group)
501 : maintain_(other.maintain_)
502 , bboTracking_(other.bboTracking_)
525 group().controlAssignment(
"Maintain", maintain_, value);
566 return bboTracking_.group();
573 maintain_ = other.maintain_;
575 bboTracking_.assignNoControl(other.bboTracking_);
583 BboTracking bboTracking_;
588template <
class BboTracking,
typename Depth>
607 :
Base(static_cast<const
Base&>(other))
608 , defaultDepth_(other.defaultDepth_)
620 return defaultDepth_;
628 this->
group().controlAssignment(
"Default Depth", defaultDepth_, value);
641 this->
group().controlChange(
642 "Fixed Depth Book Management Settings", &FixedDepthBookManagement::assignNoControl, *
this, other
663 Base::assignNoControl(other);
665 defaultDepth_ = other.defaultDepth_;
671template <
class BboTracking,
typename Depth>
689 :
Base(static_cast<const
Base&>(other))
701 this->
group().controlChange(
702 "Any Depth Book Management Settings", &AnyDepthBookManagement::assignNoControl, *
this, other
721 Base::assignNoControl(other);
762 toStr(str, strategy);
788 , mboBooks_(&group())
789 , directBooks_(&group(), 10)
790 , impliedBooks_(&group(), 2)
803 , mboBooks_(other.mboBooks_)
804 , directBooks_(other.directBooks_)
805 , impliedBooks_(other.impliedBooks_)
806 , consolidatedBooks_(other.consolidatedBooks_)
807 , updateNotification_(other.updateNotification_)
841 return impliedBooks_;
847 return impliedBooks_;
853 return consolidatedBooks_;
859 return consolidatedBooks_;
867 return updateNotification_;
884 group().
controlChange(
"Book Management Settings", &BookManagement::assignNoControl, *
this, other);
917 mboBooks_.assignNoControl(other.mboBooks_);
919 directBooks_.assignNoControl(other.directBooks_);
921 impliedBooks_.assignNoControl(other.impliedBooks_);
925 updateNotification_ = other.updateNotification_;
938 toStr(str, settings);
#define ONIXS_CMEMDH_NAMESPACE_BEGIN
#define ONIXS_CMEMDH_LTWT
#define ONIXS_CMEMDH_LTWT_CLASS_DECL(name)
#define ONIXS_CMEMDH_NAMESPACE_END
#define ONIXS_CMEMDH_NULLPTR
#define ONIXS_CMEMDH_EXPORTED
AnyDepthBookManagement(const SettingGroup *group=nullptr)
friend class BookManagement
AnyDepthBookManagement(const AnyDepthBookManagement &other)
AnyDepthBookManagement & operator=(const AnyDepthBookManagement &other)
BaseBookManagement(const SettingGroup *group=nullptr)
BaseBookManagement(const BaseBookManagement &other)
friend class BookManagement
const SettingGroup & group() const
const BboTracking & bboTracking() const
~BaseBookManagement()
Finalizes the instance.
BaseBookManagement & maintain(bool value)
Forces Handler to maintain order books.
BaseBookManagement & operator=(const BaseBookManagement &other)
BboTracking & bboTracking()
void assignNoControl(const BaseBookManagement &other)
Defines tracking attributes for a particular BBO parameter.
BboThreshold & threshold(const Decimal &value)
const Decimal & threshold() const
Threshold for the parameter being tracked.
BboThreshold(const BboThreshold &other)
const SettingGroup & group() const
friend class DirectBboTracking
Lets grouping and value assignment control functioning.
BboThreshold & operator=(const BboThreshold &other)
friend class ImpliedBboTracking
Lets grouping and value assignment control functioning.
void assignNoControl(const BboThreshold &other)
friend class MboBboTracking
Lets grouping and value assignment control functioning.
~BboThreshold()
Finalizes the group.
BboThreshold(const SettingGroup *group=nullptr)
BboThreshold & enabled(bool value)
Indicates whether tracking is enabled.
bool enabled() const
Indicates whether tracking is enabled.
Parameters affecting book management machinery.
MboBookManagement & mboBooks()
Management and tracking parameters for direct books.
ImpliedBookManagement & impliedBooks()
Management and tracking parameters for implied books.
BookManagement & updateNotification(BookUpdateNotification::Enum value)
Defines the way Handler raises order book update event.
ConsolidatedBookManagement & consolidatedBooks()
Management and tracking parameters for consolidated books.
const DirectBookManagement & directBooks() const
Management and tracking parameters for direct books.
BookManagement(const BookManagement &other)
BookUpdateNotification::Enum updateNotification() const
const ConsolidatedBookManagement & consolidatedBooks() const
Management and tracking parameters for consolidated books.
DirectBookManagement & directBooks()
Management and tracking parameters for direct books.
const MboBookManagement & mboBooks() const
Management and tracking parameters for direct books.
BookManagement(SettingChangeController *controller=nullptr)
Initializes instance with default values.
const ImpliedBookManagement & impliedBooks() const
Management and tracking parameters for implied books.
friend class HandlerSettings
BookManagement & operator=(const BookManagement &other)
A real number with floating exponent.
Defines tracking for BBO in direct books.
friend class BaseBookManagement
const BboThreshold & numberOfOrders() const
Tracking for order quantity.
void assignNoControl(const DirectBboTracking &other)
DirectBboTracking(const DirectBboTracking &other)
bool exceeded(const DirectPriceLevel &previous, const DirectPriceLevel ¤t) const
Checks whether any of thresholds is exceeded.
DirectBboTracking(const SettingGroup *group=nullptr)
DirectBboTracking & operator=(const DirectBboTracking &other)
~DirectBboTracking()
Finalizes the instance.
bool enabled() const
Indicates whether tracking enabled at all.
BboThreshold & numberOfOrders()
Tracking for order quantity.
Encapsulates price level concept.
Int32 & numberOfOrders()
Updates total number of orders.
MbpBookDepth defaultDepth() const
friend class BookManagement
~FixedDepthBookManagement()
Finalizes the instance.
FixedDepthBookManagement(const SettingGroup *group=nullptr, Depth defaultDepth=0)
FixedDepthBookManagement(const FixedDepthBookManagement &other)
FixedDepthBookManagement & defaultDepth(Depth value)
FixedDepthBookManagement & operator=(const FixedDepthBookManagement &other)
Defines tracking for BBO in implied books.
ImpliedBboTracking(const ImpliedBboTracking &other)
friend class BaseBookManagement
Lets grouping and value assignment control functioning.
const BboThreshold & price() const
Price tracking attributes.
void assignNoControl(const ImpliedBboTracking &other)
const SettingGroup & group() const
const BboThreshold & quantity() const
Quantity tracking attributes.
bool exceeded(const ImpliedPriceLevel &previous, const ImpliedPriceLevel ¤t) const
Checks whether any of thresholds is exceeded.
BboThreshold & quantity()
Quantity tracking attributes.
~ImpliedBboTracking()
Finalizes the instance.
BboThreshold & price()
Price tracking attributes.
ImpliedBboTracking(const SettingGroup *group=nullptr)
ImpliedBboTracking & operator=(const ImpliedBboTracking &other)
bool enabled() const
Indicates whether tracking enabled at all.
Encapsulates price level concept.
const Decimal & price() const
MbpBookQuantity quantity() const
Quantity for the given price.
Defines tracking for BBO in MBO books.
friend class BaseBookManagement
Lets grouping and value assignment control functioning.
const BboThreshold & price() const
Price tracking attributes.
void assignNoControl(const MboBboTracking &other)
MboBboTracking & operator=(const MboBboTracking &other)
~MboBboTracking()
Finalizes the instance.
const SettingGroup & group() const
MboBboTracking(const SettingGroup *group=nullptr)
bool exceeded(const Order &previous, const Order ¤t) const
Checks whether any of thresholds is exceeded.
BboThreshold & price()
Price tracking attributes.
MboBboTracking(const MboBboTracking &other)
bool enabled() const
Indicates whether tracking enabled at all.
Order as the member of the Market By Order (MBO) book.
const Decimal & price() const
Order price.
Base services for settings grouped by a certain criteria.
void controlAssignment(const Char *description, Assignee &assignee, Value value) const
SettingGroup(SettingChangeController *controller=nullptr)
void controlChange(const Char *description, void(Changeable::*change)(), Changeable &changeable) const
FixedDepthBookManagement< ImpliedBboTracking, MbpBookDepth > ImpliedBookManagement
Management and tracking parameters for implied books.
bool thresholdExceeded(const Decimal &, const Decimal &, const Decimal &)
BaseBookManagement< ImpliedBboTracking > ConsolidatedBookManagement
Management and tracking parameters for consolidated books.
FixedDepthBookManagement< DirectBboTracking, MbpBookDepth > DirectBookManagement
Management and tracking parameters for direct books.
void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
AnyDepthBookManagement< MboBboTracking, SortedOrders::size_type > MboBookManagement
Management and tracking parameters for MBO books.
void throwBadBboThreshold()
Raises exception on invalid best bid/offer threshold value.
Defines book update notification strategies.