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
Parameters affecting book management machinery for a books having variable depth like MBO ones.
AnyDepthBookManagement(const SettingGroup *group=nullptr)
Initializes the instance with default values.
friend class BookManagement
AnyDepthBookManagement(const AnyDepthBookManagement &other)
Initializes the instance as a copy of the other one.
AnyDepthBookManagement & operator=(const AnyDepthBookManagement &other)
Re-initializes the instance as a copy of the other one.
Parameters affecting book management machinery for a particular book type (direct,...
BaseBookManagement(const SettingGroup *group=nullptr)
Initializes instance with the default values and setting validation facilities enabled.
BaseBookManagement(const BaseBookManagement &other)
Initializes the instance as a copy of the other one.
friend class BookManagement
const SettingGroup & group() const
const BboTracking & bboTracking() const
Parameters affecting BBO tracking for books which given settings refer to.
~BaseBookManagement()
Finalizes the instance.
BaseBookManagement & maintain(bool value)
Forces Handler to maintain order books.
BaseBookManagement & operator=(const BaseBookManagement &other)
Re-initializes the instance as a copy of other one.
BboTracking & bboTracking()
Parameters affecting BBO tracking for books which given settings refer to.
bool maintain() const
Forces to build order book of a particular kind.
void assignNoControl(const BaseBookManagement &other)
Re-initializes as a copy of the other instance without involving value assignment control services.
Defines tracking attributes for a particular BBO parameter.
BboThreshold & threshold(const Decimal &value)
Updates threshold for the parameter being tracked.
const Decimal & threshold() const
Threshold for the parameter being tracked.
BboThreshold(const BboThreshold &other)
Initializes as a copy of the other one.
const SettingGroup & group() const
Instance of a group which the given set of settings belongs to.
friend class DirectBboTracking
Lets grouping and value assignment control functioning.
BboThreshold & operator=(const BboThreshold &other)
Re-initializes as a copy of the other one.
friend class ImpliedBboTracking
Lets grouping and value assignment control functioning.
void assignNoControl(const BboThreshold &other)
Re-initializes the instance as a copy of the other one and bypassing assignment control.
friend class MboBboTracking
Lets grouping and value assignment control functioning.
~BboThreshold()
Finalizes the group.
BboThreshold(const SettingGroup *group=nullptr)
Initializes BBO attribute (price, qty, etc) tracking.
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)
Initializes the instance as a copy of the other one.
BookUpdateNotification::Enum updateNotification() const
Defines the way Handler raises onBookUpdated callbacks.
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)
Copies settings from the given instance.
A real number with floating exponent.
Defines tracking for BBO in direct books.
friend class BaseBookManagement
Lets grouping and value assignment control functioning.
const BboThreshold & numberOfOrders() const
Tracking for order quantity.
void assignNoControl(const DirectBboTracking &other)
Re-initializes as a copy of the other instance without involving value assignment control services.
DirectBboTracking(const DirectBboTracking &other)
Initializes the instance as a copy of the other one.
bool exceeded(const DirectPriceLevel &previous, const DirectPriceLevel ¤t) const
Checks whether any of thresholds is exceeded.
DirectBboTracking(const SettingGroup *group=nullptr)
Initializes tracking with the optional grouping services enabled.
DirectBboTracking & operator=(const DirectBboTracking &other)
Re-initializes instance as a copy of the other one.
~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.
Parameters affecting book management machinery for a particular book type (direct,...
MbpBookDepth defaultDepth() const
friend class BookManagement
~FixedDepthBookManagement()
Finalizes the instance.
FixedDepthBookManagement(const SettingGroup *group=nullptr, Depth defaultDepth=0)
Initializes instance with defaults and optional grouping facilities.
FixedDepthBookManagement(const FixedDepthBookManagement &other)
Initializes the instance as a copy of the other one.
FixedDepthBookManagement & defaultDepth(Depth value)
Defines default depth of order book for the security whose definition wasn't received or had no corre...
FixedDepthBookManagement & operator=(const FixedDepthBookManagement &other)
Re-initializes the instance as a copy of the other one.
Defines tracking for BBO in implied books.
ImpliedBboTracking(const ImpliedBboTracking &other)
Initializes the instance as a copy of the other one.
friend class BaseBookManagement
Lets grouping and value assignment control functioning.
const BboThreshold & price() const
Price tracking attributes.
void assignNoControl(const ImpliedBboTracking &other)
Re-initializes as a copy of the other instance without involving value assignment control services.
const SettingGroup & group() const
Instance of the group of setting which the given set of settings belongs to.
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)
Initializes tracking with optional grouping facilities.
ImpliedBboTracking & operator=(const ImpliedBboTracking &other)
Re-initializes the instance as a copy of the other one.
bool enabled() const
Indicates whether tracking enabled at all.
Encapsulates price level concept.
const Decimal & price() const
Price value.
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)
Re-initializes as a copy of the other instance without involving value assignment control services.
MboBboTracking & operator=(const MboBboTracking &other)
Re-initializes the instance as a copy of the other one.
~MboBboTracking()
Finalizes the instance.
const SettingGroup & group() const
Instance of the group of setting which the given set of settings belongs to.
MboBboTracking(const SettingGroup *group=nullptr)
Initializes tracking settings with optional grouping services.
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)
Initializes the instance as a copy of the other one.
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
Guarded assignment of the given value to the given variable.
SettingGroup(SettingChangeController *controller=nullptr)
Initializes the group of settings with the given validation services.
void controlChange(const Char *description, void(Changeable::*change)(), Changeable &changeable) const
Guarded invoke of the given routine which assumes complex change or update for the given object.
FixedDepthBookManagement< ImpliedBboTracking, MbpBookDepth > ImpliedBookManagement
Management and tracking parameters for implied books.
bool thresholdExceeded(const Decimal &, const Decimal &, const Decimal &)
Checks whether new value exceeds given threshold in compare to the old value.
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.
@ OnEndOfEvent
Book update event is raised at the end of market event.
@ OnSecurityChange
Book update event is raised once security id is changed in sequence of market data entries being proc...
Represents a service controlling change/update operations for the collections of settings.