The CQG XL Toolkit has been upgraded to include functionality to place 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 can be included in the batch orders. The Algo Orders and the parameters (as a CSV file) can be used. This functionality is detailed later in the post.
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 function is a subset of the XL Toolkit's Orders and Positions functions.
Enter this function in an Excel cell:
Click the “fx” parameter in the formula toolbar and this dialog opens.
This table details the full list of the function arguments (not all are required):
||Disambiguates identical order placement data (enter 1, 2, 3, etc.)
||Account ID from XL Toolkit Account Data
||Buy or Sell
||Total positive size of the order
||For STP or STL
||For LMT or STL
|Good till date
||GTD Date (Local to the Exchange)
||Exact Name of the Algorithmic Strategy
||Used with contracts that require speculation type to be provided: Speculation/Arbitrage/Hedge
||Used to determine open or closing a position. Open/Close/Close Yesterday
||Time when the order should be sent to the exchange
||Default is Park, False to not Park
The second argument (Account ID) is found using the XL Toolkit. Select Account data and then Account ID and Account Name, From the output select the appropriate Account ID and you can reference the cell's location in the Functions Arguments dialog.
This sample downloadable spreadsheet with more details is available here.
Using Algo Orders from Desktop or CQG One for Batch Orders
The XL Toolkit Batch Order functionality can place Algo Orders.
This table lists the Algo Orders and a brief description:
||Series of Peg Orders
||Exchange Iceberg Slicer
||Tick Order as Offset
||Probability-Based PayUp Logic
||Join Best Levels
||Random-Sized Synthetic Iceberg
||Multi-Leg Arrival Price with PayUp Logic
||Randomized Time-Weighted Average Price
||Stop Limit Arrival Price
||Stop Limit Synthetic Iceberg
||Stop Limit Sniper
||Time-Weighted Average Price
||Volume-Weighted Average Price
More information detailing CQG Algos is available here.
The dialog states that the exact name of the Algo strategy must be used.
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. Basically,
- Place a parked configured Algo Order using the CQG Algo Order Ticket
- Copy the parameters from the Order information window
- Paste it into Excel and save it as a CSV file.
Therefore, open the CQG Algo Order Ticket. Log in, select “Parked” and select the Algo you want. This example is using the CQG Iceberg.
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 Algo Order 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 to use is UTC.
Select the parked order, right-click then select Order Info.
The highlighted text is the parameters information used. Select copy to clipboard.
Open a blank Word document and “paste merged formatting”
The parameters are CQG_MaxQty 10 and CQG_MinQty 5. However, notice that Word displays the parameter name and the value on separate rows. For the Excel CSV file the parameter name has to be the first cell in a row and the parameter value has to be in the next cell in the same row.
Here are the steps in Word to format the correctly format parameters.
Select the parameters and replace paragraph returns with tabs.
CQG_MaxQty 10 CQG_MinQty 5
Select the above and replace the “tabs and CQG” with “paragraph returns and CQG”.
New formatted parameters can be C&P into Excel and saved as a CSV file.
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.”