- Fundamental Concepts
- ADL Learning Guide
- Basic Blocks
- Trading Blocks
- Discrete Blocks
- Round Block
- Display To Decimal Block
- Formula Block
- Average Block
- Stopwatch Block
- Clock Block
- Note Block
- Random Number Block
- Pause Block
- Log Block
- IsNumber Block
- Once True Always True Block
- Not Block
- Loop Block
- Exit Block
- Risk Block
- Workup State Block
- Alert Block
- Math Block
- Actor Blocks
- TT Analytics Block
- Sniper Algo
- Order of Discrete Event Message Propagation
- Grouped Blocks and Library Functionality
- Rules Of Virtualization
- Jump Blocks
- Safety And Preventive Design With Visual Feedback
- Flip For Sell Orders Functionality
- Dynamic Data ExchangeLink
- Leave Orders On Pause Or Cancel
- Creating and Launching Order Ticket Algorithms (OTAs)
- Breakpoint Functionality
- Algorithm Behavior At Market Close and Disconnect
- Exporting Block Output Values
ADL Designer Window
Main Canvas Areas
ADL Designer Window consists of three main areas that the user interacts with:
Main area where the strategy is designed. As the user depicts a
strategy on the canvas, code is written "behind the scenes" for
Basic Canvas Functions
- Dropping a Block: Left-click, hold, and drag the desired block from the ADL Block Toolbar (located to the left of the canvas) and drop it onto the canvas.
- Select Multiple Blocks: Highlight multiple blocks by holding left-click and dragging the mouse cursor over the desired blocks.
- Move Block(s): Left-click, hold and drag a block (or a group of blocks) around the canvas to the desired location and release the left-click.
- Group Blocks: Highlight multiple blocks. Then right-click on one of the highlighted blocks, and select “Group Blocks” from the drop-down menu that appears.
- Delete Block(s): Right-click on a block (or a group of blocks) and select “Delete” from the drop-down menu that appears.
- Copy Block(s): Right-click on a block (or a group of blocks) and select “Copy” from the drop-down menu that appears. Select a place on the whiteboard, right-click and select “Paste” to paste the copied block(s) onto the canvas. Conventional keyboard commands CTRL+C (to copy) and CTRL+V (to paste) will also achieve the same effect.
- Add Edge (i.e., Connect one block’s outputs to others’ inputs): Left-click, hold, and drag the mouse cursor from a block's output/input port (the cursor should change to a hand with a pointing finger) to another block's input/output port and release the left-click.
- Delete Edge: Right-click on the edge between two blocks (the edge will be highlighted in red) and select “Remove Edge" from the menu that appears.
- Screen Panning / Zooming / Zoom-to-fit: Hold the SPACEBAR and left-click on a location on the canvas (not on a block) to designate an anchor point. While holding the SPACEBAR and left-click, move the mouse to pan the canvas respective to the anchor point. Use the scroll wheel on the mouse to zoom in/out. Right-click anywhere on the canvas and select Zoom-to-Fit to fit the entire algorithm on the canvas.
- Toolbar Tray: Retractable tray containing all the blocks the user can use to design his algorithm; the blocks are grouped according to their functions.
- Information Panel:
Panel displaying various types of information regarding the user's
current design. The Information Panel is organized into several
- Error Messages: Displays the flaws in the user's current design as well as possible solutions. Click the button to toggle between show/hide.
- Warning Messages: Displays potentially unintended designs. Click the button to toggle between show/hide.
Example: Error List Tab
Variables: When this tab is active, it displays information about the blocks which are designated as variables in the user's current design and allows the user to modify their output values during execution (see: User-Defined Variable for more information).
Enabling the "Ignore Market State" checkbox allows the algorithm to continue running even if one of the markets reported by an Instrument Block contained in the algorithm closes. By default, the checkbox will be unchecked and the algorithm will pause when one of the markets reported by an Instrument Block closes. Using this checkbox allows the user to design logic outside of regular trading sessions (e.g., submitting orders during pre-open).
Enabling the "Ignore Gateway Down" checkbox allows the algorithm to continue running even if it detects a disconnect to one of the TT Gateways that it may be using. This enhancement was introduced to allow the algorithm to gracefully handle daily TT Gateway session rollovers. However, enabling this setting will not allow the algorithm to continue running if the Algo SE server is restarted. Note: A time-based logic may need to be introduced into the algorithm to suppress Order Blocks from routing orders to a disconnected TT Gateway. Routing to a disconnected gateway will likely result in an order timeout, causing the algorithm to pause.
Note: Variables can be rearranged using the drag-and-drop method. After deployment, the order of the variables is reflected within the Algo Dashboard window, Parent Order Book window , and Algo Variables dialog within X_TRADER.
Example: Variables Tab
Export Values: Display values that are available to be exported and displayed within the Algo Dashboard window and Parent Order Book window. Use the drop-down menus located in the “Display In Algo Dashboard Columns” to select a value for each of the columns. These columns correspond to the A, B, C, D, and E columns within the Algo Dashboard window and Parent Order Book window (see: Exporting Block Output Values for more information).
.Example: Export Values Tab
Breakpoints: When this tab is active, it displays the breakpoints assigned in the user's current design (see: Breakpoints Functionality for more information). Check/un-check the "Enable All" check box to enable/disable all breakpoints. The user may also enable/disable a single breakpoint by checking/un-checking the checkbox located to the left of the breakpoint. When the user double-clicks on a breakpoint listed in the tab, the canvas will highlight the associated block.
Example: Breakpoints Tab
Log: When this tab is active, it displays the logs produced by the Log Block (see: Log Block for more information).
Example: Log Tab
Alert: When this tab is active, it displays the alert messages triggered by the Alert Block (see: Alert Block for more information).
Example: Alerts Tab
- Block Properties Tab: Panel displaying the customizable properties for the selected block. When the user selects a block on the canvas, this panel will become populated with the selected block's properties. The user may modify the block's properties through this panel. When multiple blocks are selected, this tab will display properties common to all selected blocks. The user may modify the common properties to affect changes to multiple blocks at once.
- Solution Explorer: Panel displaying the group block hierarchy in a tree-diagram format. Any group block is represented as a "branch" in the tree and all sub-blocks contained within are represented as sub-branches. The branch that is highlighted in pink indicates which group block the user is currently is viewing on the canvas.
Additional Canvas Functions
: Menu Strip:
Menu Strip: The following options can be accessed through the menu strip:
Upper Level Options
|Sub Level Options||Functions|
Creates a new canvas.
Open an existing algorithm.
Save the current algorithm.
Displays a dialog box that lets the user specify the drive, directory, and name under which to save the current algorithm.
|Load Block Library|
Any grouped block the user creates can be saved (see: Grouped Blocks for more information) for future use. Select this option to load a library of group blocks. Once the library is loaded, right-click on the canvas and navigate to “Add Custom Block" to see the loaded libraries. Then navigate to a library, and then select a particular grouped block contained within the library.
Allows the user to assign a password to the strategy file. Upon re-opening the strategy the user will be prompted to enter the password.
|Edit||Undo [Last Action]|
Undo the previous action in ADL. A shortcut key of CTRL-Z will also execute this command. The Undo command is limited to structural changes in ADL – for instance, the Undo command will not reverse the selection of “Show Inputs/Outputs” option on a Grouped Block.
|Redo [Last Action]|
Redo the previous action that was undone. A shortcut key of CTRL-Y shall also execute this command.
Displays a ‘Find Blocks’ window that lists all of the blocks in the algorithm. Invalid blocks or blocks with errors are highlighted in red. When the user double-clicks on a block in the list, the canvas will shift and highlight the selected block.
Displays a window displaying customizable user preferences:
Show/hide Information Panel.
Allows the user to select and run a tutorial file.
Note: By default tutorial files are located in the <rootdrive>:ttx_tradertutorials folder and have an extension of .tuto.
: Window Browse Buttons / Navigate Up / Compile
Window Arrows: The browse arrows in the Designer Panel are used to change views between the main canvas and the grouped block canvases. The buttons will be unavailable when there are no grouped blocks.
Navigate Up: Use this button to navigate to a higher branch in the group block hierarchy (displayed in the Solution Explorer located at the right edge of the Designer)
Compile Button: When the auto-compile option is turned off, the user will be able to compile the algorithm manually by pressing this button. By default, the auto-compile option is on, and the compile button is unavailable.
: Customer Selection Box
Customer Selection Box: The drop-down selection box will display all available customer defaults, as configured in the User Setup. The selection made here will be used as the default customer name when the algorithm deployed, but the customer name can be changed prior to launch through the Algo Dashboard.
: Designer Panel Play / Pause / Stop / Step-Through Buttons
Play / Pause / Stop / Step-Through Buttons: In Simulation mode, the user will be able to execute, pause and stop the algorithm directly from the Designer canvas using these buttons. When the algorithm is executed from the canvas, the blocks will output dynamic values reflecting the execution of the strategy.
: Order Side Selection
Order Side Selection: The drop-down selection box will allow the user to choose between BUY or SELL. Few blocks in ADL have the capability to perform an alternate function depending on the user's selection of this drop-down menu (see: Flip For Sell Order Functionality for more information). Use the Order Side Selection to design strategies which can alternate between buy and sell side routines.
: Status Strip
Status Strip: The Status Strip will show the compilation status of the user's current design. During compilation, the status bar will show "Compiling Code." The status bar will show "Status: Not Started," if the compilation is successful, and "Invalid Blocks,"if the compilation fails.
: View Control
View Control: The View Control panel will allow the user to alternate between the normal cursor, the zoom cursor (drag and designate an area to zoom), and the coordinate cursor (left-click and hold to create an anchor point, then move the mouse to shift the canvas respective to the anchor point).
: Zoom In / Out
Zoom In / Out: The zoom in / out scale allows the user to zoom in and out of the Designer canvas. The user can also use the center scroll button on the mouse to perform the same function.
: Canvas Pan Window
Canvas Pan Window : The Canvas Pan Window provides the user with an overview map of the entire algorithm and a translucent blue overlay which can be dragged around the map to bring different portions of the algorithm into focus. The Canvas Pan window is minimized by default, but can be expanded by pressing the "+" icon.
Example: Expanded Canvas Pan Window
Block Context Menu Functions
Upon right-clicking on a block, a context menu will display the following set of options:
The user will be able to copy a block by right-clicking on a block and selecting the "Copy" option from the context menu that appears. The user may also select the block and then press CTRL+C keys. Breakpoints and variable aspects of a block will not be copied.
After copying a block, the user may paste the block by right-clicking on a location on the canvas and selecting "Paste" option from the context menu that appears. The user may also press CTRL-V keys.
After copying a group of blocks, "Paste Special" option can be accessed by right-clicking on the canvas. Paste Special exists to give the user a tool to “reverse" the functions of certain blocks which can act as pivots between buy side and sell side routines. Using drop-down menus, the user will be able to reverse signs, functions or attributes of certain blocks.
Example: Paste Special Window
The user may delete a block by right-clicking on a block and selecting the "Delete" option from the context menu that appears. The user may also select a block and press the DELETE key.
The user may rename a block by right-clicking on a block and selecting the "Rename" option from the context menu that appears. The user may also double-click on a block. Either method will display a free-form textbox prompting the user to change the default name.
The user may resize a block by right-clicking on a block and selecting the "Resize" option. Upon selection, four black squares in the four corners of the block will be displayed. By manipulating the squares, the user can resize the block.
|Show Downstream Variables|
This option will show all the blocks whose output values depend on the output value of the selected block. In ADL, dependent blocks are called “downstream” blocks (see: Order of Discrete Event Message Propagation for more information). Upon selection of this option, the canvas will turn dark grey and the downstream route starting from the selected block will be highlighted. If Jump blocks are used in the route, the relevant Jump Blocks will be highlighted.
|Show Upstream Variables (accessed by right-clicking on an input port of a block)|
This option will show all the blocks upon which the selected input port depends on. In ADL, such blocks are called “upstream” blocks. Upon selection of this option, the canvas area will turn dark grey and the upstream route starting from the selected input port will be highlighted. If Jump Blocks are used in the route, the relevant Jump Blocks will be highlighted.
This option will display a separate window containing an in-depth help document about the selected block and videos containing practical examples of the block's usage.