Entering Batch Orders with the CQG XL Toolkit

The CQG XL Toolkit Add-In for Microsoft Excel® pulls today's market data, orders data and open positions data into Excel via the Internet. Historical data is not available. The Add-In does require you to have an account with a CQG FCM partner, as this is an FCM enablement. Please contact your FCM.

The toolkit has been upgraded to manage and execute batch orders.

A batch order is a list of orders that will include the accounts, symbols, action (buy or sell), qualifiers such as market, limit or stop orders and other important details. The XL Toolkit permits the user to place the orders as parked or sent directly to the CQG Gateway. In addition, Algo Orders and the parameters (as a CSV file) can be included in the batch orders. This functionality is detailed later in the post.

An introductory post is available here. There is a prebuilt downloadable Excel file included in the post.

The following details building the batch order Excel file.

First, in order to use the XL Toolkit the user must contact their FCM and request the XL Toolkit enablement. You can download the XL Toolkit here. Once the XL Toolkit is installed you Logon using your trading credentials.

Notice in the image above there is a greyed out button “Place Orders.” This button is used to send the orders once the spreadsheet has this function:

=CQGXLPlaceOrder()

with all of the Obligatory Parameters entered. The above function is a subset of the XL Toolkit’s Orders and Positions functions.

Copy the above function and paste it into a cell in Excel.  Click on the fx in the formula bar and this dialog opens.

 

 

This table details the full list of the function arguments:

Index

Disambiguates identical order placement data (enter 1, 2, 3, etc.)

Account ID

Account ID from XL Toolkit Account Data

Side

Buy or Sell

Size

Total positive size of the order

Instrument

Symbol

Order Type

MKT/LMT/STP/STL

Stop price

For STP or STL

Limit price

For LMT or STL

Duration

DAY/GTC?GTD

Good till date

GTD Date (Local to the Exchange)

Algo Strategy

Exact Name of the Algorithmic Strategy

Algo Parameters

CSV File

Speculation

Used with contracts that require speculation type to be provided: Speculation/Arbitrage/Hedge

Open/Close

Used to determine open or closing a position. Open/Close/Close Yesterday

Activate at

Time when the order should be sent to the exchange

Comment

Order Comment

Park

Default is Park, False to not Park

 

In the downloadable sample Column R, Row 11 is the Order Summary using the function: =CQGXLPlaceOrder(A11,B11,C11,D11,E11,F11,G11,H11,I11,J11,K11,L11,M11,N11,O11,P11,Q11)

You could also use: =CQGXLPlaceOrderTable(A11:Q11)

 

 

If no obligatory functions are missing then the return from the function is fully populated. If you were missing a parameter, for example, you did not enter the symbol, then the error will be declared and you have to fix it.

 

If the Order Summary is correct then click on the XL Toolkit on the Excel Ribbon and select “Place Orders.”

 

All accepted orders are given an Order ID (replacing the populated function). However, the CQG Gateway may determine an error, such as an expired symbol was used.

The parked orders will appear in the CQG Orders and Positions Parked Tab.

 

The XL Toolkit Batch Order functionality can place Algo Orders.

 

This table lists the Algo Orders and a brief description: Here is a link to Algo Order details.

Name

Algo Description

CQG Arrivalprice

Arrival Price

CQG Iceberg

Iceberg

CQG IcePegger

Series of Peg Orders

CQG IceSlicer

Exchange Iceberg Slicer

CQG OffsetPayUp

OffsetPayUp

CQG OffsetTick

Tick Order as Offset

CQG PayUp

Probability-Based PayUp Logic

CQG Peg

Join Best Levels

CQG Riceberg

Random-Sized Synthetic Iceberg

CQG Roll

Multi-Leg Arrival Price with PayUp Logic

CQG RTWAP

Randomized Time-Weighted Average Price

CQG SLArrival

Stop Limit Arrival Price

CQG SLIceberg

Stop Limit Synthetic Iceberg

CQG SLSnipe

Stop Limit Sniper

CQG Snipe

Liquidity-Taking Sniper

CQG Tick

Tick-BasedPayup Logic

CQG TWAP

Time-Weighted Average Price

CQG Vola

Volatility Order

CQG VWAP

Volume-Weighted Average Price

 

Returning to the =CQGXLPlaceOrder() the dialog shows that the actual Algo Order name is required.

 

Algo orders have parameters which must be included in the batch order as a CSV file. The CSV file is saved to the hard drive.

 

 

Here are the steps to creating the parameters CSV file.

 

Select and place a “parked” Algo Order using the CQG Order Ticket.

Set the parameters for the Algo Order.

Place the Parked Algo Order.

Note: Above, you can set the Start Time and the End Time as part of the parameters. The time zone used by the Algo Orders Engine is UTC time (Coordinated Universal Time). It is converted from local time to UTC. Therefore, when using your CSV parameters file with Start and End Times the time zone is UTC,

 

Double click “i” to open the Order Info window.

Copy the parameters from the Order information window by clicking Copy Text, then paste it into Excel.

 

 

 

In the above example, delete rows 1 through 12 and rows 16 and 17 leaving behind the three parameters.

 

 

Save the file as a CSV file to the C Drive. Then enter the file’s path in the cell for Algo Params.

 

Once your spreadsheet is completed, then to send the orders in go to the XL Toolkit on the Excel Ribbon and select “Place Orders.”