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).
This 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 a block is enabled with the functionality, it will turn dark red in color, indicating that it will perform an alternate function should the user change the value of the Order Side Variable.
Example. A bi-directional strategy using Flip For Sell Orders functionality
Note: Certain parts of the above strategy must be virtualized to function correctly. The virtualization is not shown for the sake of clarity in demonstration.
The user 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. 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 window: 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.