A discrete event message occurs at a single point in time and can be used to capture market data at that precise moment.
Discrete event messages have a key characteristic: when a block outputs a pulse of discrete event message, an algorithm temporarily stops channeling continuous messages from the exchange servers. Continuous message channels will remain closed while the pulse of discrete event message propagates throughout the algorithm. In effect, this behavior will "freeze" the output of blocks such as the Instrument Field block which channels streaming market data. In this static state, the pulse of discrete event message will traverse the pathway designed by the user, updating the output values of the blocks which lie in its path, allowing the user to capture and use the market data existing precisely at the moment of a discrete event.
Once this propagation is complete, the algorithm will resume channeling continuous messages from all exchange servers.
The following is a simplified illustration of this mechanism in effect:
The diagram below shows an example of an Instrument Field block (yellow block on the left) channeling a continuous numeric value into the Order block (blue block on the right). The Instrument Field block channels the best bid price of an instrument specified by the user, and the Order block uses this streaming data to quote buy orders at the best bid price for the specified instrument with the specified quantity (instrument and quantity inputs are not shown in the illustration).
When one or more of the quoted orders are executed, the Order block receives a Fill Confirmation message from the exchange server and outputs a discrete event message in the form of a single pulse. At this time, the algorithm stops channeling continuous messages from the exchange server. The pulse of discrete event message propagates through the algorithm, following the pathway designed by the user. It updates the output values of the blocks which lie in its path.
Once the propagation is complete, the algorithm resumes channeling continuous messages from the exchange server.