Many of the ADL blocks allow you to define formulas to calculate output values for the blocks. For such blocks, you can open the Formula Editor from their respective Block Properties panel.
The Formula Editor shows the types of values and operations you can use in a formula, including:
The Formula Editor provides an auto-complete feature that lets you easily refer to information already available in your algo. When type one of the special characters (@ or #), the editor display a list of items that you can insert as variables into the formula. Also, typing characters after the symbol filters the list to items beginning with those characters.
![]() |
Typing # displays a list of all fields available in an an incoming discrete event message. |
![]() |
Typing @ displays a list of blocks on the canvas that contain one or more continuous output ports. |
The following samples illustrate some basic formula types.
The following formula simply outputs a Boolean value of TRUE, which can then be used by other downstream blocks.
The following formula for the ExitPrice Value Extractor block calculates the price two ticks higher than the fill price, which you could use to submit an exit Sell order two ticks higher than the price of the Buy order fill.
![]() |
To access the value of the fillPrice message field, we type # and select the field. |
![]() |
To access the value of the TickSize Field block, we type @ and select the desired block. |
The following formula outputs a TRUE/FALSE value based on whether the current opposite inside market is two ticks higher than the price of a fill.
The Formula Editor includes drop-down menus that allow you to add values that update dynamically as the algo runs.
connectors: Lets you reference the value of a continuous output port from any other block in the algorithm. You can also type the connector in the form, [block.connector].
The following connector within the Formula Editor displays the continuous output ports from the Analytics block, named Analytics0 within the algorithm.
messages: Lets you extract any of the following information embedded within a discrete event message. You can also type the connector in the form, {fieldName}.
"string": (Alert block only) Lets you add customized text to a message string.
The following ADL blocks allow you to create custom formulas.
Trading blocks
Discrete blocks
Misc blocks