ADL®

Subtract Block

The Subtract Block subtracts the second input from the first input and outputs the difference.

Example Use the Subtract Block to subtract 2 from the fill quantity.

More about Flip for Sell

Many automated strategies in ADL will have nearly identical buy and sell side routines, with certain blocks acting as "pivot" points. To enable a single algorithm to act either as buy or sell side routine as needed, several blocks in ADL will have the option "Flip For Sell Orders." This option enables them to perform an alternate function depending on the user's selection of the Order Side Variable (either BUY or SELL). The Order Side Variable will appear automatically for any algorithm containing a block with the "Flip For Sell Orders" functionality enabled, and the user must set this variable prior to launching an algorithm. When this functionality is enabled, the Subtract Block will either perform a subtraction or an addition depending on the value of the Order Side Variable (see: Flip For Sell Orders Functionality for more information).

When you enable Flip for Sell, the appearance of the Subtract Block changes as shown.

Block settings

To change default block settings, double-click the block to open the Block Editor.

Setting Description
Name Name to display beneath the block on the ADL canvas
BodyColor Background color of the block
FlipForSell

Whether to enable a single algorithm to act either as buy or sell side routine as needed

See Flip For Sell Orders Functionality for more information.

Description Optional text to explain how the block is used