Try TT Now

ADL®

ASE Order Block

The ASE Order Block takes a custom spread (created through the Autospreader® functionality) and treats it like a single instrument.

The ASE Order Block will submit a buy or sell order to the exchange for the specified custom spread at the input price and quantity when the On/Off input is TRUE.

 
Recommended Tutorials For This Section

For a tactile learning experience, please try the following tutorial:

  • ASE Order Block

Operations
  • Inputs , , are required and is optional (TRUE when not provided)
  • The ASE Order Block will also modify its quote leg orders according to changes in its inputs:

    • When Input  changes: the block will delete the current working quote orders, then add new quote orders pertaining to the specified custom spread (but will not affect the working hedge orders).
    • When Price Input or Quantity Input changes: the block will modify the current working quote orders.
    • When the On/Off Input changes: the block will delete the current working quote orders when the input value turns FALSE but working hedge orders will not be affected. When the input value reverts to TRUE, the ASE Order Block will re-add the quote leg orders.

Details
  • Working quantity shows the number of "whole" spread units that are currently working. A single spread unit is considered to be "whole" only if none of the pertaining quote leg orders are executed. For example, suppose that a user is working to achieve a single unit of a 2:3 spread. Accordingly, the ASE Order Block will work 2 lots on the quote leg. At this time, will be 1, indicating that 1 complete unit of the spread is working. Then suppose that one of the 2 lots on the quote leg is executed. The spread unit will no longer be considered "whole," and will decrease to 0.

    Note: will persist even when the turns to FALSE. will change only when the changes or when the current working spread order is completely filled.

  • To allow lower-level control, discrete event messages are generated at different stages of achieving a unit of spread. To be specific, discrete event messages will be generated from the corresponding output ports upon: quote order fills (), hedge order submissions (), hedge order fills () and complete spread fills (). The user may connect additional logic to these ports to take actions at specific times.
Using Single Order Container in conjunction

The ASE Order Block can be used with a Single Order Container as follows: when the ASE Order Block successfully submits a hedge order, the block will output a discrete event message through the Hedge Add OK output. If the user feeds the message into a Single Order Container, the receiving container will take complete control of the hedge order until the order is filled or deleted.

Example. Using Single Order Container in conjunction

Once it starts managing a hedge order, the Single Order Container will continue to submit additional requests to reflect the changes in its Price, Quantity, and Delete condition inputs (note that the container will not react to changes in the inputs of the respective ASE Order Block):

  • If the Price or Quantity input changes: the container will modify its managed hedge order to reflect the change
  • If the "del" condition turns TRUE: the container will delete its managed hedge order and the respective ASE Order Block will not replace the order in any circumstance.
  • If the Stop Trigger changes: the container will not respond. The Single Order Container cannot attach a Stop Trigger to its managed hedge order.
  • If the Disclosed Quantity changes: the container will modify its managed hedge order to reflect the change. The Single Order Container will modify the managed hedge order into an iceberg order.

If a user wants to connect the message to a Single Order Container, they should recognize that they are inserting logic that will be activated only after the ASE Order Block submits the orders for the hedge leg. However, in a typical spread, the hedge leg order is executed immediately upon submission. Therefore, the logic for the hedge leg order comes into play only in situations where the order is not immediately executed. Such situations can arise if the user adjusts the pay-up-tick parameter of the spread to a negative value or if the hedge leg order fails to execute (i.e., the hedge leg order is "hung").

 ADL Tip: If the custom spread is set up to quote from both legs of a two-legged instrument, the ASE Order Block will not necessarily know which one of the two legs generated the hedge order; thus, a Branch Block and two Single Order Containers should be used in conjunction as shown in the following illustration to successfully distinguish between the two legs.

Example. Using Branch Block to parse between buy and sell legs

Virtualizing Single Order Container and Multiplexer

The Single Order Container can only manage a single order at a time. When the container is overloaded with more than a single order, it will forfeit the control of its current order to accept a new one. Such overloading can occur when an ASE Order Block generates multiple hedge orders from multiple partial fills on the quote leg order.

Example. Overloading a Single Order Container

In order to prevent this undesirable behavior, the user can virtualize the Single Order Container and its respective Multiplexer (see: Virtualization for more information). With this setup, a new copy of the Single Order Container will be generated every time the ASE Order Block generates and submits a new hedge order. Each copy of the order container will manage a single hedge order with unique price, quantity, and delete condition inputs.

Example. Virtualizing a Single Order Container

Manually modifying an order controlled by the ASE Order Block

If the user manually modifies a working quote order managed by an ASE Order Block or a working hedge order managed by the respective Single Order Container, the following rules will apply:

  • If the user attempts to modify the quantity of a working quote order, the ASE Order Block will delete the working quote order and the spread order, but leave the working hedge orders uninterrupted. The ASE block will resubmit a new order if there are no hung hedge orders. If there are any hung hedge orders then the ASE block will not resubmit the changed quote order until the hedge order has either been filled or deleted. Keep in mind that the ASE Order Block will always attempt to satisfy the user-specified quantity. The ASE Order Block will exhibit the same behavior when the user manually deletes a working quote order.
  • If the user manually modifies the price of a working quote order, the ASE Order Block will accept the modified price until the next relevant market update (e.g., a change in the best bid or offer price of the hedge leg contract). Upon market update, the ASE Order Block will re-calculate the price and modify the working quote order in accordance with its price input.
  • If the user manually modifies or deletes a working hedge order, the respective Single Order Container will permanently relinquish control over to the user, but discrete event messages will still be generated from the appropriate output ports at the expected times. Keep in mind that the Single Order Container will always leave its managed hedge orders in the book whether the user pauses or stops the algorithm.
  • If you set the Ignore External Modification option, the ASE Order Block will not go dormant when its child order is externally modified (by a user, for example). If the modification was a delete, the ASE Order Block will immediately try to add another child order. If the modification involved a price or quantity change, the ASE Order Block will honor the new price or quantity until one of its input values changes.

View: Double-Click Edit Window

Double-Click Edit Window

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

  • 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 ASE Order Block will submit either buy or sell orders depending on the user's selection of the Order Side variable (see: Flip For Sell Orders Functionality for more information). The user may alter the value of 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
    • 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).
  • Order Tag: This text box allows the user to tag the orders generated by the ASE Order Block with custom text which will appear in the “Order Tag” column of the Order Fills Window. By assigning text to each order, you can quickly sort and filter orders on the Order Fills Widow by using the Order Tag column.
  • Sniper: Enables the ASE Order Block to submit Autospreader Sniper orders. The Autospreader Sniper property is not dynamic (i.e., not an exposed input on the block). Refer to Sniper Orders .
  • Order Messages: Check/un-check to expose/de-expose the respective discrete event output ports.
  • Options: Check/un-check to enable/disable the following options:

    • Ignore Inputs After Add: When this option is checked, the ASE Order Block will consider its inputs only at the time of a spread order submission. Once a spread order is submitted and working, the ASE Order Block will ignore any changes in its inputs, also ignoring the input. In effect, checking this option instructs the ASE Order Block to submit a "one-shot" spread order. On the other hand, when this option is unchecked, the ASE Order Block will continue to modify the working quote leg orders to reflect changes in any of the inputs (as described in the Operations section above).
    • Ignore External Modification: When this option is enabled, the ASE Order Block will not go dormant when its child order is externally modified (by a user, for example). If the modification was a delete, the ASE Order Block will immediately try to add another child order. If the modification involved a price or quantity change, the ASE Order Block will honor the new price or quantity until one of its input values changes.
Sniper Orders

Sniper is an Autospreader order type that only submits outright leg orders into the market when all the legs of the spread can cross the market to attempt a complete spread fill at the desired spread price. When a leg order is submitted, it enters the market and is immediately filled to the extent possible. The resting balance of a Sniper order does not get managed by Hedge Manager in Autospreader, but can be managed in ADL using the ASE Order Block in conjunction with a Single Order Container Block.

To enable the ASE Order Block to submit and manage Sniper orders:

  1. Double-click the ASE Order Block to open the edit window.
  2. In the Edit ASE Order Block window, click Sniper. This allows the user to submit Sniper orders and exposes the Sniper order discrete output checkboxes. Spread Fills is checked by default.

  3. Select the following:
    • Sniper Leg Add OK: Discrete output. This connector fires an event message when the ASE Order Block submits child leg Limit orders after the parent Sniper spread order is submitted. If this discrete event message is fed into a Single Order Container Block, the block manages the resting Sniper child leg order. Make sure that the Single Order Container Block is virtualized to prevent overloading.
    • Sniper Leg Fills: Discrete output. This connector fires an event message when the ASE Order Block generates a Sniper order leg fill.
  4. Click OK.

    Result: The ASE Order Block is enabled for submitting Sniper orders and managing the child leg orders of a pending Sniper spread. The Sniper-enabled ASE Order Block appears as follows: