ADL provides a variety of block types that ensure you have the necessary tools to create both simple and complex algorithms:
Each block in ADL can be thought of as a processing unit: it takes in a number of inputs, processes the inputs according to its unique functions, and then outputs the results. As such, every block has input and output ports, with the inputs located on the left side of the block and the outputs on the right side.
Every block has its own inputs and outputs.
You can connect one block's output port to another block's input port, ultimately articulating the overall logic of the strategy. However, connections are allowed only between two compatible port types. ADL uses five different types of input/output ports, and connections are limited to ports of the same type.
ADL blocks support five different types of input/output ports. The ports are distinguished according to the type of information that flows through each. To help you easily identity the different port types, ADL uses different colors for each type of port and uses light shades for input ports and dark shades for output ports.
Numeric port: Inputs/outputs an integer or decimal number. Numeric ports are colored light and dark red.
For example, an Add block has numeric input and output ports.
True/False port: Inputs/outputs either a True or a False (also called Boolean values). True/False ports are colored green.
An And block has True/False input and output ports.
Instrument port: Inputs/outputs market data for an instrument. Instrument ports are colored blue.
For example, an Instrument block has an instrument output port.
Variable port: A variable port can turn into any one of the above three types. When you connect an output port of one type (e.g. numeric) into a Variable input ports located on a block, all other Variable ports on that block will automatically change to that type (ex. all other Variable ports will shift into Numeric ports). Variable ports are colored yellow.
For example, an If-Then block has variable input and output ports.
If you connect a numeric value to the variable port, the yellow variable ports change to red, as associated with numeric ports.
Discrete Event Message port: Inputs/outputs discrete event messages that are generated by several designated blocks whenever a significant market event, such as a fill, occurs. Discrete event message ports are colored white or black.
For example, a Branch block has discrete input and output ports.
Every block in ADL has one or more required inputs. When you add a block to the canvas, the Problems tab in the Information Panel lists errors for each required input. As you connect the inputs, the error messages are removed.