ADL Basic Concepts

ADL Basic Concepts

Edges

An edge is the line that connects an output port of one block to the input port of another block. Edges define how information flows through an ADL algo by identifying the pathways between ADL blocks. When a block's output port sends a value, that value propagates to the connected blocks which can then use the value to perform their corresponding block actions. You can connect one block's output port to another block's input port, ultimately defining the overall logic of the algo.

  1. Edges that send information from an Instrument block output port to the inst input port of an Order block and the input port of a Field block.
  2. An edge that sends the best bid price from the Field block output port to the price input for the Order block.
  3. An edge that sends the quantity from the Number block output port to the qty input port of the Order block.

Note An input port can receive only a single connection, while an output port can connect to multiple inputs.

Connecting ports of different data types

Edges can only provide connections between compatible port types. For example, a Boolean block output port can connect to an input port of an Or block, but not to an input port of an Add block. When attempting to connect “unlike” ports, ADL displays a visual warning on the canvas to indicate that the connection is not allowed.

Circular references

ADL does not allow a an output from a block to be fed back into its own input. When you attempt to create such a circular connection, ADL displays a visual warning on the canvas to indicate that the connection is not allowed.