Advanced concepts

Advanced concepts

Flip for Sell orders functionality

Many automated strategies in ADL will have nearly identical buy and sell side routines, with certain blocks acting as "pivot" points. As such, several blocks in ADL will have the option "Flip For Sell Orders" functionality which enables them to perform an alternate function depending on the user's selection of the Order Side variable (either Buy or Sell). For example, when this functionality is enabled, the Add block will either perform an addition or a subtraction depending on the value of the Order Side variable.

Example A bi-directional strategy using Flip For Sell Orders functionality (with flip-for-sell enabled blocks highlighted)

Note Certain parts of the above strategy must be virtualized to function correctly. The virtualization is not shown for the sake of clarity in the illustration.

You must always design from the buy side routine and then enable the Flip For Sell Orders functionality for the appropriate pivot blocks in order to switch to the sell side routine.

In Trade widgets, such as Algo Dashboard, a Side variable 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.

The user may alter the value of the Order Side variable through one of the following methods, but note that the Order Side variable must be declared prior to launching an algorithm and cannot be changed post-launch.

  • Using the drop-down menu located at the top portion of the Designer canvas.
  • Using the Variables Tab on the Algo Dashboard.
  • Using the MD Trader widget: Clicking on the bid side column (blue column) will set the Order Side Variable to "Buy," and clicking on the offer side column (red column) will set the Order Side Variable to "Sell." This method applies to Order Ticket Algorithms (OTA) only.

Blocks that support flip-for-sell functionality

The following blocks support flip-for-sell functionality:

  • Add and Subtract blocks
  • Greater Than and Less Than blocks
  • Field blocks with the following fields:
    • Bid Price / Ask Price
    • Bid Qty / Ask Qty
    • High / Low
    • Direct Bid Qty / Direct Ask Qty
    • Bid Orders Qty / Ask Orders Qty
    • Direct Bid Price / Direct Ask Price