Trade
Overview
TT Platform
Description
Task
Browser Access
Description
Task
Videos
TT Desktop
Description
Task
Videos
Reference
Workspace Windows
Description
Task
Videos
Widgets
Description
Task
Preferences
Description
Viewing Market Data
Time and Sales
Task
Reference
Description
Depth
Description
Task
Reference
Market Grid
Description
Task
Videos
Reference
Product Grid
Description
Task
Reference
Spread Matrix
Description
Task
Videos
Reference
Basic Order Entry
TT Order Types
Description
Task
Videos
Reference
Case Studies
TT Premium Order Types
Description
Task
Reference
Order Ticket
Description
Task
Use Cases
Reference
MD Trader®
Description
Task
Videos
Reference
Order Profiles
Description
Task
Reference
Routing Rules
Description
Task
Blocktrader
Description
Task
Videos
Reference
Trading Crypto on TT
Description
Task
Videos
Reference
Trading on B3
Order Management
Order Book
Description
Task
Reference
Floating Order Book
Description
Task
Reference
Fills
Description
Task
Reference
Positions
Description
Task
Reference
Orders and Fills
Description
Task
Reference
Audit Trail
Description
Task
Reference
Audit Query
Description
Task
Reference
Account List
Description
Task
Videos
Reference
Position Manager
Description
Task
Reference
Alert Manager and Alert Viewer
Description
Task
Videos
Reference
Account & User Restrictions
Description
Task
Reference
Balances
Description
Task
Reference
TT® OMS
Care Orders
Description
Task
Videos
Reference
Lock and Release
Description
Task
Bulking
Description
Task
Videos
Stitching and Splitting
Description
Task
Combining
Description
Task
Order Passing
Description
Task
Use Cases
Order Exceptions
Description
Task
Options
Options on TT
Description
Videos
Options Chain
Description
Task
Use Cases
Videos
Reference
Options Trade Monitor
Description
Task
Videos
Reference
Vol Curve Manager
Description
Task
Use Cases
Videos
Reference
Electronic Eye
Description
Task
Videos
Reference
RFQ Viewer
Description
Task
Videos
Reference
RFQ with Counterparties
Description
Task
Counterparty Manager
Description
Task
Strategy Creation
Description
Task
Use Cases
Reference
Options Risk
Description
Task
Videos
Reference
Options Risk Matrix
Description
Task
Videos
Reference
Watchlist
Description
Task
Videos
Reference
Expiration Manager
Description
Task
Volatility Calculator
Description
Task
TT Uncovered 2.0
Description
Task
TT Uncovered 3.0
Description
Task
QuikStrike
Description
Task
Spread Trading
Autospreader
Description
Task
Use Cases
Videos
Reference
Autospreader Rules
Description
Task
Videos
Reference
Hedge Manager
Description
Task
Videos
Reference
Trading in Yield
Description
Task
Use Cases
Reference
Aggregator
Description
Task
Videos
Reference
Algo Trading
Algo Dashboard
Description
Task
Videos
Reference
Template Manager
Description
Task
Order Management Algos (OMAs)
Autotrader
Description
Task
Reference
Videos
Excel integration with TT
Description
Task
Videos
Reference
Market-Making Algos
Analytics
Charts
Description
Technical Indicators
Task
Videos
Reference
Trader Analytics
Description
Task
Reference
ADL
ADL Overview
Introduction to ADL
Description
Task
Videos
Reference
ADL Basic Concepts
Description
Task
Reference
Building your first algo
Lessons
Advanced concepts
Description
Task
Case Studies
Jump blocks
Group blocks
Virtualized blocks
Library blocks
Trading Blocks
Discrete blocks
Arithmetic blocks
Basic blocks
Logic blocks
Miscellaneous blocks
Setup
Setup Overview
Getting Started
Description
Task
Videos
Reference
Supported Order Types and TIFs
Company Administration
Connections
Description
Task
Videos
Reference
Accounts
Description
Task
Videos
Use Cases
Reference
Users
Description
Task
Videos
Reference
Company
Description
Task
Reference
Order Tag Defaults
Description
Task
Account Administrators
Description
Task
TT Premium Services
Description
Task
TT Access
Description
Task
Advanced Features
Description
Risk Management
Risk Administration
Description
Task
Risk Limits
Description
Task
Videos
Reference
Pre-Trade Portfolio Risk
Description
Task
Reference
Order Cross Prevention
Description
Task
Videos
KRM Limits
Description
Task
TT® OMS
TT OMS Administration
Description
Task
Use Cases
Reference
Exchanges: Americas
B3
Description
Task
CBOE
Description
Task
Cboe FX
Description
Task
Reference
CFE
Description
Task
CME
Description
Task
Dealerweb
Description
Task
EBS Direct
Description
Task
EBS Market
Description
Task
Fenics
Description
Task
FMX
Description
Task
FMX_USTF
Description
Task
Goldman Sachs Commodity Blocks (GSCB)
Description
Task
Referece
ICE
Description
Task
MexDer
Description
Task
MIAX_FUT_CH
Description
Task
MIAX_FUT_NY
Description
Task
MX
Description
Task
Nodal
Description
Task
NFI
Task
Exchanges: EMEA
ATHEX
Description
Task
BIST
Description
Task
DGCX
Description
Task
EEX
Description
Task
EPEX SPOT
Description
Task
Reference
Eris
Description
Task
Eurex
Description
Task
Videos
Euronext
Description
Task
GFO-X
Description
Task
ICE_L
Description
Task
JSE
Description
Task
LME
Description
Task
LME NTP
Description
Task
LSE
Description
Task
MEFF
Description
Task
NDAQ_EU
Description
Task
NASDAQ_NED
Description
Task
Nord Pool
Description
Task
Reference
WSE
Description
Task
Exchanges: Asia/Pacific
ABX
Description
Task
ASX
Description
Task
FEX
Description
Task
HKEx
Description
Task
JPX
Description
Task
NSE
Description
Task
NZX
Description
Task
SGX
Description
Task
SGX GIFT
Description
Task
TAIFEX
Description
Task
TFEX
Description
Task
TFX
Description
Task
CoinFLEX
Task
Exchanges: Crypto
Coinbase
Description
Task
Kraken
Description
Task
FIX Support
FIX Ruleset
Description
Task
FIX Sessions
Description
Task
Secondary Accounts
Description
Task
Monitor
TT Mobile
TT Backtesting
APIs
TT REST API 2.0
Getting Started
API Reference
TT REST API 2.0 (UAT)
Getting Started
API Reference
TT .NET SDK
Getting started with TT .NET SDK
Creating the application framework
Working with instruments
Subscribing for market data
More about prices
An in-depth look at the Price class
Working with orders and fills
Handling trade subscriptions
Working with trade subscriptions
Working with Algos
Algo Server
TT Order Types
TT Premium Order Types
Advanced Concepts and Options
Appendix
TT CORE SDK
Getting Started with TT Core SDK
Creating Application Framework
Working With Instruments
Subscribing for Market Data
Working with Orders and Fills
Creating a TT Application Server
Appendix
TT Trade Surveillance
Overview
Using TT Trade Surveillance
Cluster View
Core Models
Market Abuse Models
Cross Product Models
Spoofing Models
Improperly Matched Trade Models
Market Rate Models
Trading Behaviors Models
Miscellaneous Models
Configurable Models
Reports
Wachlists
Reference
TT FIX Services
TT FIX General
Getting Started
FIX Message Structure
Session messages
TT FIX Order Routing
Overview
TT FIX message conversations
Supported application messages
TT FIX Market Data
Overview
TT FIX message conversations
Supported application messages
TT FIX Drop Copy Out
Overview
TT FIX Message Conversations
Supported application messages
Compliance Feed messages
TT FIX Drop Copy In
Overview
Supported application messages
TT FIX Gateway
Getting Started
FIX Message Structure
Components
Session messages
Price Gateway Messages
Order Gateway Messages
TT FIX Recovery
Overview
FIX Recovery Methods
Supported application messages
Compliance Feed Messages
MiFID II Support

Order block

On this page

The Order block is a trading block that submits a buy or sell order to an exchange. The Block Properties panel for the block lets you specify all of the order details. Depending on the order type selected, you specify a varying set of inputs.

Example: An Order block with its properties set to ‘Buy’ receives instrument, price, quantity data to place an order and Boolean data to activate or deactivate the order. Once the order is in the market the order block outputs the working order quantity. When the order fills the order block outputs a discrete message containing data about the fill.

The block keeps track of the number of fills received for its order and reduces the value of the wrk qty output port by subtracting the fill quantities from the total order quantity specified in the qty input port.

Note: For orders with a disclosed quantity, the wrk qty output port will be equal to or less than the specified on the disc qty input port.

If the user manually deletes or modifies an order generated by the Order block, it will relinquish control to the user, but a discrete event message will still be generated for order executions. Specifically, the Order block will ignore left-side inputs, but still generate values for the right-side outputs. If the user pauses and resumes the algorithm, the Order block will attempt to re-locate its managed order and re-take control. If it cannot locate the order, the Order block will compare the number of fills it has achieved so far against the user-specified input quantity and submit a new order for the remaining balance.

Order block inputs

The number and types of inputs required for an order block are determined by the selected order type.

Order types

  1. Limit order
  2. Market order
  3. Iceberg order
  4. Stop Limit order
  5. Stop Market order

Based on the selected order type, the Order block exposes the following block inputs:

  • inst: Identifies the instrument being traded with the order block

  • price: Indicates the price at which to submit the order

  • qty: Represents the total order quantity

  • on/off: Controls whether to execute an order based a Boolean condition

    When this True/False input is provided, the Order block will delete the working order when the input value changes from TRUE to FALSE. The Order block will add a new order when the value changes from FALSE to TRUE.

  • disc qty: Indicates the disclosed quantity to use for Iceberg orders

    When this input is provided, the Order block will submit a limit or market order with an exchange-recognized disclosed quantity tag. Upon approval, the exchange will acknowledge the total order quantity as the input quantity, but disclose only the specified amount at a time. If disclosed quantity is greater than input quantity, exchange will acknowledge the input quantity as the total order quantity.

  • trigger: Specifies the trigger price for a Stop order

    • When the Order block is set to submit BUY orders, the Stop Trigger price must be greater than the last traded price of the instrument;; for SELL orders, the Stop Trigger must be less than the last traded price.
    • When the Order block is set to submit BUY orders, the price input must be greater than or equal to the Stop Trigger; for SELL orders, the price input must be less than or equal to the Stop Trigger.

Order block outputs

  • wrk qty: Shows the quantity of the order still actively working in the market

    Note: For StopMarket and StopLimit orders, the port outputs 0 until the stop order is triggered, at which time the port outputs the order quantity.

  • Add Req: Provides access to the new order request sent to the exchange

  • Add OK: Provides access to the new order acknowledgment received from the exchange

  • Chg Req: Provides access to the order change request sent to the exchange

  • Chg OK: Provides access to the acknowledgment received from the exchange or a modified order

    Note: For StopMarket and StopLimit orders, the discrete message sent through this port will set the isTriggered message field to TRUE when the stop order is triggered.

  • Del Req: Provides access to the order delete request sent to the exchange

  • Del OK: Provides access tothe delete order acknowledgment received from the exchange

  • fills: Provides access to the fill acknowledgments

For order blocks that work with Autospreader spreads, the outputs change to the following:

  • wrk qty: Shows the quantity of the spread order still actively working

    Note: For StopMarket and StopLimit orders, the port outputs 0 until the stop order is triggered, at which time the port outputs the order quantity.

  • Add Req: Provides access the new spread request sent to the exchange

  • Add OK: Provides access to the new spread acknowledgment discrete event message

  • Chg Req: Provides access the spread change request sent to the exchange

  • Chg OK: Provides access to the spread update acknowledgment discrete event message

    Note: For StopMarket and StopLimit orders, the discrete message sent through this port will set the isTriggered message field to TRUE when the stop order is triggered.

  • Del Req: Provides access to the spread delete request sent to the exchange

  • Del OK: Provides access to the spread delete acknowledgment discrete event message

  • Hedge Add OK: Provides access to the discrete event message generated when the Algo Server successfully submits a hedge order for the spread

  • Quote Fills: Provides access to the fill message for a quoting leg of the spread

  • Hedge Fills: Provides access to the fill message for a hedge leg of the spread

  • fills: Provides access to the spread fill message

Block properties

To customize the block, update the Block Properties.

Property Description
Name Name to display beneath the block on the ADL canvas
Type

Type of exchange-native order to submit

Choice include:

  • Limit
  • Market
  • Iceberg
  • StopLimit
  • StopMarket

Note: If you select a type not supported natively by the exchange, the order will be rejected.

Side Whether the order represents a Buy or Sell order
TIF

How long to leave a generated order working in the market

Choices include:

  • Day to leave the order working until the end of the trading session
  • GTC to leave the order working until manually canceled
  • IOC to cancel any remaining order quantity that is not filled immediately
  • FOK to cancel the order if it is not completely filled immediately
Flip for Sell Order

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

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 Discrete 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).

Autospreader

Whether the block will manage an Autospreader order

If enabled, the Order block exposes additional outputs to provide access to activity for the spread legs.

When Ext Mod Occurs

Action to take if the order is modified outside of the algorithm

  • Ignore to continue using the block inputs and ignore the external modifications
  • Stop Managing to ignore the block inputs and use the external modifications instead
  • Detach to ignore the block inputs and stop sending block outputs
Leave Child Order On

Whether orders generated by the Discrete Order block should remain in the order book even if the algorithm is paused or canceled.

A paused state can result from a client side connection drop.

Ignore Inputs After Add

Whether to ignore any changes in its inputs

When this option is checked, the Order block will consider its inputs only at the time of an order submission. Once an order is submitted and working, the Order block will ignore any changes in its inputs. In effect, checking this option instructs the Order block to submit a “one-shot” order. On the other hand, when this option is unchecked, the Order block will continue to modify the working order to reflect changes in any of the inputs (note that the inputs can be dynamic):

  • When instrument input changes, the block will delete the current working order and then add a new order pertaining to the specified instrument.
  • When a price or quantity input changes, the block will modify the current working order.
  • When the on/off input changes, the block will delete the current working order when the input turns FALSE, and then add a new order when the input reverts to TRUE.
  • When the stop trigger or disclosed quantity inputs change, the block will modify the current working order as long as the specified stop trigger or disclosed quantity meets the approval conditions
Submit in Suspended State

Whether to submit the order to the market or on hold.

When enabled, the order will be entered as a held order. Held orders remain in this state until they are submitted or canceled. For more details, refer to the Placing Orders on Hold section in the Trade help.

AutoResubmit

Whether to re-submit a new order whenever its current working order is deleted

When enabled, the new order will be submitted with an order quantity of OrderQty-FillQty. In effect, checking this option instructs the Order block to submit new orders when necessary in order to ultimately achieve the user specified. When this option is unchecked, however, the Order block is allowed to submit a single order during the life of the algorithm. Keep in mind that a manual-delete performed by the user will cause the Order block to relinquish control over to the user regardless of whether this option is checked or not.

Note: If the block’s on/off input port is FALSE at the time, the Order block will wait until the reverts to TRUE and then submit a new order.

Connectors

Additional output ports to expose for selected events:

  • Add Requested
  • Added
  • Change Requested
  • Changed
  • Deleted Requested
  • Deleted
Order Tag

Custom text to display in the Order Tag column of the Fills widget for orders generated from this Discrete Order block. If the algo is launched with an Instance name in Algo Dashboard, the TextTT field for all child will be concatenated with with parent order’s TextTT field.

For example, suppose you set this field value to OT123 and the algo is launched from the Algo Dashboard as follows:

The TextTT field of the algo parent order is set to MM 3×10. The TextTT field of each child order submitted by this algo is set to MM 3×10:OT123.

By assigning text to each order, you can quickly sort and filter child orders of this algo in the Fills widget based on the TextTT column.

OpenClose / Strategy flags

When set to True, this allows users to enable and define the Open/Close, TradingStrategy, and ReverseSpreadOC flags:

  • OpenClose: Defines the Open, Close or FIFO (first in, first out) of the trade itself:
    • Open
    • Close
    • FIFO
  • TradingStrategy: Defines the type of trading strategy for the order. Trading strategy indicator. Supported for orders on certain China market connections only. Supports the following values:
    • Arbitrage
    • Hedge
    • Directional
  • ReverseSpreadOC: Sets whether to reverse the spread on open/close.Indicates whether to reverse the open/close flag on the far leg of a spread order. Mandatory on DCE and CZCE multi leg orders. Supported for orders on certain China market connections only. Supports the following values:
    • Do not reverse open close flag on far leg
    • Reverse spread open close flag on far leg
Order Color

Color to display next to orders generated by this block in the TT MD Trader and Order Book widgets, similar to the following.