The Alert Block can be triggered in 2 ways:
The true/false input turns to True from False (note that the default value of the input is False).
A Discrete Event Message enters the block via the Discrete Input port.
Note: The user may make a connection to either the true/false input or the Discrete Trigger input, but not both.
By using the double-click edit form, the user may select Audit trail, Sound, Message Box, or Email as preferred method of alert.
Note: When an algorithm is executed from the ADL Designer canvas in client-side simulation, an Alert Block will not generate an actual audit trail message, a message box, or an email. Instead, the Alert Block will generate the specified text in the Alert Tab of the Information Panel (located at the bottom portion of the Designer canvas). However, if Sound is selected as the method of alert, the Alert Block will generate the specified sound.
Warning: For the Alert Block to operate, X_TRADER must be running on the client at all times, even if the algorithm in question is deployed and running on an AlgoSE server.
View: Double-Click Edit Window
Double-Click Edit Window
Double-click on the block to generate a block edit form which will allow you to specify the content and the method of an alert:
- Alert Formula: Clicking on the formula link will display a green canvas where the user can define an equation which will determine the specific value to be captured by the snapshot at the moment the block is triggered by an incoming discrete event message, or, when the True/False input turns True.
- Alert Action: Select
one or more methods of alerts by clicking on the icons. The following
methods are available:
- Audit Trail Message: Selecting this method will allow you to further specify the text and the background color of the message. When the Alert Block is triggered, it will print a message to the Audit Trail containing the message, highlighted with the selected background color.
- Sound: Selecting this method will allow you to further select a sound from a list displaying all .wav files present in the default sounds folder for X_TRADER. When the Alert Block is triggered, it will generate the specified sound.
- Message Box: When the Alert Block is triggered, it will generate a non-modal message box tagged with the name of the algorithm which will contain the specified text with a timestamp. Subsequent messages will be displayed as a new row in the same message box, and you may use the scroll bar to browse previous messages. Note that a single Alert Block will generate a single message box.
- Email: Prior to using this option, you must specify the email address of a recipient using the Alerts tab which is located in the Global Properties of X_TRADER . When the Alert Block is triggered, it will generate and send an email to the specified recipient containing the specified content.
- Frequency: Displays only when the true/false input is connected
to the Alert Block. Enter one of the following settings:
- Once: An alert is fired once when the true/false input turns from false to true.
- Repeat Every [X] [seconds/minutes/hours]: An alert is fired
once when the true/false input turns from false to true, and then
repeats every X seconds/minutes/hours as long as the input stays true.
View: Using Internalized Logic Canvas
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:
- : On the logic canvas, the user can define an equation which will determine the specific value to be retrieved and displayed as the content of the alert. By dragging the icon onto the canvas, the user can write free-form text that will also be displayed in the Information Panel. However, a “+” icon needs to be dragged onto the canvas in order to string together the icon with a Message Info icon or a Block Value icon.
- : 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