ADL® Documentation
- Fundamental Concepts
- ADL Learning Guide
- Basic Blocks
- Trading Blocks
- Discrete Blocks
-
Miscellaneous 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
-
Advanced Concepts
- 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
Spread Fill Generator Block
Spread Fill Generator Block collects fills from multiple trading blocks and calculates a spread price, as if each instrument pertaining to each of the trading blocks comprise a custom spread.
Operations
To use the Spread Fill Generator, the user must:
- Create multiple pairs consisting of an Instrument Block and a trading block (e.g., Order Block), with each pair serving as a device to quote orders for a single leg of the user-designed spread.
Double-click on the Spread Fill Generator Block and specify the legs of the user-designed spread by selecting the Instrument Blocks created in Step 1 (see Double-Click Edit Window below for more information). The Spread Fill Generator will automatically expose 3 input ports for each leg specified: Instrument, Ratio and Multiple
- Instrument Input: Feed
message from the appropriate trading block created in Step 1
- Ratio: Feed a numeric
value
which determines how many units of the respective leg are needed. The sign of the
input determines whether the units need to be bought or sold.
Multiple: Feed a numeric value
which serves as the multiplier used for the respective leg during spread price calculation
Note: The signs for Ratio and Multiple will usually be the same.
- Instrument Input: Feed
Once every leg achieves the required number of units (specified by each leg's
input), Spread Fill Generator will use the following formula to calculate the spread price:
- Spread Price = (Leg
1 Average Price x Leg 1
) + (Leg 2 Average Price x Leg 2
) + ... for all legs
- Spread Price = (Leg
1 Average Price x Leg 1
- The calculated spread
price will be displayed in Audit Trail, and the Spread Fill Generator
will output a discrete event message
containing the calculated spread price.

Double-Click Edit Window
Double-click on the block to bring up an edit window:
: Clicking this button will generate a list of all Instrument Blocks existing on the canvas. Once an Instrument Block is selected from this menu, the Spread Fill Generator will consider the respective Instrument as a leg of the user-designed spread. Note that an Instrument Block cannot be selected twice from this menu.
Example. Add Leg Menu
: Clicking this button will remove the respective Instrument Block from the Spread Fill Generator's list.
- Net Change: Check this box to instruct the Spread Fill Generator to use the Net Change (instead of price) for the respective instrument for the purpose of spread price calculation.