← Back to X_TRADER® Help Library

ADL® Documentation

Round Block


Round Block takes in a numeric input and rounds it to the nearest increment defined by  ; the result is output as  .

Double-Click Edit Window

Double-click on the block to bring up an edit window:

  • Rounding Type: Select from one of three rounding modes:
    • Normal: traditional rounding rules
    • Always Down: round to lower increment
    • Always Up: round to higher increment
  • Flip for Sell Orders: 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 Rounding Block will either round up or down depending on the value of the Order Side Variable (see: Flip For Sell Orders Functionality for more information). The user may alter the Order Side variable through one of the following three methods:
    • Using the drop-down menu located at the top portion of the Designer canvas
    • Using the Variables Tab on the Algo Dashboard
    • By 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 only (see: Creating and Launching Order Ticket Algorithms for more information).

Example. Round Block with Flip For Sell Orders enabled