By default, the Handler processes market data for all securities available in a particular market data channel. For certain channels, it may be a huge amount of data which may cause the Handler to allocate a significant amount of system resources (like a memory). From the other side, it often happens that not all securities are the point of interest. For these reasons, the Handler provides an ability to define a subset of securities for which it monitors market data, maintains books and report about other market-related events. The Handler fires no events for any security not present in the defined subset. This feature is called selecting securities or security filtering.
Selecting securities is similar to the process of filling a bag with apples. The OnixS::CME::MDH::InstrumentSelection class must be used to gather securities into a collection for which the Handler must process market data. There're no limits on the quantity of securities which can be included into the selection.
If at least one security is added to the filter, the Handler stops raising events for all securities available in the market data channel. Since that moment the Handler fires events only for securities included in filtering.
Securities can be filtered using security id, security group, symbol, and asset attributes. For each of these attributes, the OnixS::CME::MDH::InstrumentSelection class exposes the corresponding member returning a collection of attribute values which can be manipulated as the regular
An empty (blank) security selection causes the Handler to process market data and to trigger events for all securities on the channel.
The following code demonstrates how to instruct the Handler to process data only for securities selected by the user: