The Value Extractor block receives a discrete message, extracts specified fields, and can access data from elsewhere in your algo to perform logic and calculations. The Value Extractor block can then output fields extracted from the discrete message, data from elsewhere in your algo, or specified numeric or Boolean values. The Value Extractor block is commonly used to take a snapshot of information that may be constantly changing in the market, such as the quantity at the best offer at the time of a fill for a given instrument. By taking a snapshot, the algo can capture the information at a single moment in time and use the "frozen" information later on even if the market continues to change. When a new discrete event message triggers the Value Extractor block, the block will replace the old snapshot with a new one.
The Value Extractor block works as follows:
Example The Value Extractor block is configured with a formula to extract the trade quantity from the incoming discrete event message.
Example The Value Extractor block receives a fill message from an entry order block. The Value Extractor block is configured with a formula to extract the fill quantity from the discrete event message and compare the fill quantity from the fill message to the best ask quantity in the market at the time of the fill. Based on the result, the block will either output the fill quantity or best ask quantity through its val port as the quantity for the exit order.
Example The Value Extractor block is configured as a "toggle" to indicate the occurrence of a specific event in the market. To do this, the user can instruct a Value Extractor block to take a snapshot of the numeric value "1" (in the internal logic canvas, type the value "1") when triggered by a discrete event message. Before the discrete event message occurs, the Value Extractor block will output the default value of zero. However, when the discrete event message occurs, the Value Extractor block will output a value of 1, indicating that the discrete event has occurred.
To customize the block, update the Block Properties.
|Name||Name to display beneath the block on the ADL canvas|
Equation used to calculate the value of the block
The edit link opens the Formula Editor.