To use the Value Injector Block, it is important to recognize that discrete event messages carry information about their respective discrete events. For instance, a discrete event message generated and output from the Fills Output port of an Order Block will necessarily carry the Fill Price and Quantity related to the respective fill.
To be specific, every discrete event message is composed of multiple "fields," with numeric or true/false values assigned to each. For instance, a discrete event message generated from a fill will contain a numeric value in the "Fill Price" field and the "Fill Quantity" field. But it will contain zero's for other irrelevant fields, like "Deleted Quantity."
The Value Injector Block operates in the following manner:
- A discrete event message enters the Value Injector Block.
- The Value Injector Block over-writes the specified fields of the incoming with user-specified values. The fields and the values must be specified in advance by double-clicking on the block.
- After the over-write process, the Value Injector Block passes on the modified message through its right-side output port.
ADL Tip: The Value Injector Block can over-write multiple fields of the incoming at once.
Double-Click Edit Window
Double-click on the block to bring up an edit window:
- Select a field from the column, and specify an equation on the green canvas using the white arithmetic and boolean icons at the top. Upon trigger, the Value Injector Block will evaluate the equation and use the result to over-write the specified field.
- Define equations for multiple fields to over-write multiple fields of an incoming .
Internalized Logic Canvas
Internalized Logic Canvas: Several blocks in ADL contain an internalized logic canvas which can be accessed by double-clicking on the block.
Example. Internal Logic Canvas
The canvas is used to define user-made equations which will play an important role in the overall operation of the respective block. The following icons can be dragged onto the green canvas to define an equation:
- : These icons can be linked to define an arithmetic equation or a True/False statement.
- : The Block Value Icon allows the user to reference the output of any other block in the algorithm. When dragged onto the canvas, the Block Value Icon will display a menu from which the user will be able to choose a block within the algorithm (except for the blocks contained in a virtualized block).
: The Message Info Icon allows the user to extract certain information embedded within a discrete event message, such as a Fill Confirmation Message. When dragged onto the canvas, the Message Info Icon will display the following selectable fields:
Field Description Limit The price of the respective order or the order about to be submitted OrderQty The total order quantity of the respective order or the order about to be submitted WorkingQty The working quantity of the respective order or the order about to be submitted FillPrice Fill price FillQty Fill quantity Instrument Instrument of the submitted order ExeQty Total filled quantity of the respective order DisclosedQty The disclosed quantity or percentage (%) of total goal quantity viewable to the market DeletedQty The canceled quantity of the deleted order or the order about to be deleted IsBuy When this field is selected, the respective block will evaluate the user's fill confirmations messages (not trade data message disseminated by the exchange) and will output a Boolean value of TRUE if the user's fill was a buy side execution StopTrigger The price at which the respective stop-limit or stop-market order is activated TradeQty Quantity of the last trade for a specific instrument TradePrice Price of the last trade for a specific instrument IsQuotingOrder Applies to discrete event messages generated by an ASE Order Block. The field will output a Boolean value of TRUE if the message was generated from an order submission for the quote leg of the respective spread IsHedgeOrder Applies to discrete event messages generated by an ASE Order Block. The field will output a Boolean value of TRUE if the message was generated from an order submission for the hedge leg of the respective spread User Field 1 - 4 An empty field that can be populated with a value using a Value Injector Block. The value may then be extracted using a Value Extractor Block