Trading in units is similar to trading in lots. The difference is that you can place large orders in lots as one order in units.
For example:
<unit commodity="F.EP" lotsInUnit="10"/>
In this case, placing an order for 1 unit is the same as placing an order for ten lots.
To trade in units, you first need to enable units trading and upload an xml conversion file.
Unit trading must be enabled and the conversion file must be valid in order for unit trading components to be active on order entry and management windows.
Formatting Conversion Files
The conversion file that maps units to commodities should be formatted in this way:
<?xml version="1.0" encoding="utf-8"?>
<units>
<unit commodity="string commodity name 1" lotsInUnit="integer number"/>
<unit commodity="string commodity name N" lotsInUnit ="integer number"/>
</units>
unit commodity = commodity name with an optional instrument prefix
lotsInUnit = number of lots in single unit, between 1 and 2,147,483,647
If only one type of option is defined in the conversion file, the opposite type is added automatically and given the same value. For example: if the file defines only C.EP with rate 10, P.EP with rate 10 is added. Otherwise, each conversion rate is independent.
Possible error types:
• If the xml file is not accessible, you receive a message stating that file access is denied or the file is not found. In that case, trading in units for all commodities is disabled.
• If the xml file has an invalid XML structure, you receive a message asking you to correct the errors. In that case, trading in units for all commodities is disabled and previous conversion information is cleared from the Unit Sizes window.
• If the xml file has empty commodity names, you receive a message asking you to correct the errors.
• If the xml file has invalid ratio values, you receive a message asking you to correct the errors. In that case trading in units for these commodities is disabled.
• If commodities are duplicated, then the first in the list is used, and you receive a message with a list of duplicated commodities.
• If commodity names are invalid (for example, containing more than a prefix and symbol), you are notified of the invalid names.
In the case of an error, the field is highlighted in red.
Save this sample xml file to your machine as a way to get started creating your own conversion file.
Viewing Unit Size Data
The data in the conversion file can be reviewed on the Unit Sizes window.
To open the window, click View on the CQG Trader toolbar, and then click View Unit Sizes. This image is only an example of the type of data you’ll see:
The Commodity column displays the commodity name or the commodity name with instrument prefixes. Unit sizes are sorted by commodity name. Futures are displayed without a prefix, while all other commodity types include prefixes. For example, C.EP.
The Size column indicates how many lots are in a single unit. If a conversion rate is either incorrect or undefined, the size field is blank and highlighted in red.
Click the Reload button to update the information from an updated xml conversion file. This button is active only if trading in units is enabled in preferences.
The Unit Sizes window is separate from the CQG Trader window, so it can be viewed outside of the application window.
Reloading Conversion Files
The system automatically recognizes that an updated conversion file has been saved and prompts you to reload the file:
The file is also reloaded when:
• you reattach the file using the browse button on the Display Configuration preferences window;
• when CQG Trader is restarted; and
• when you click the Reload button on the Unit Sizes window.