Utilities

This group of functions provide key data such as is the spreadsheet connected for market data and trade routing:

 

    =ApiTimeout()

    =Instrument()

    =IsMarketDataConnected()

    =IsOrderRouterConnected()

    =LineTime()

    =NAPlaceholder()

    =OrderTransactionPerSecondLimit()

    =XlsTraderVersion()

 

 

For slower computers or computers with known internet reliability issues this function allows users to specify a longer period of time for XLS Trader to establish a connection with CQG's order routing server before freeing up resources to other application tasks.

 

=ApiTimeout()

 

 

Register an instrument

 

If you do not have a market data enablement for a particular market, but you want to develop a trading system you can use =Instrument() to register the symbol and to specify metadata.

=Instrument("F.US.EP?","EP",0.25,12.5,"USD")

 

 

Next, you can verify that order routing is connected and market data is connected. If you click on XLS Trader in the Excel Ribbon, you will see a “Connectivity” icon.

=IsMarketDataConnected() returns 1 if true and =IsOrderrouterConnected() returns 1 if true. The cell is formatted to display “Connected” and a green format if the cell value is 2.

 

 

There is a function for pulling in Line Time. Line Time is Central US Time.

=LineTime()

 

 

Some functions return the #N/A error if there is no data, such as the AverageEntryPrice function. Excel has a function that if the value is an error, then you can elect to have something other than the error declaration displayed.

 

For example, =IFERROR(AverageEntryPrice(Long),"") will display a blank cell if there is no average entry price or you could replace the double quotes with “0”.

 

XLS Trader has its own #N/A error placeholder where you can declare what is displayed instead of #N/A for all cells displaying #N/A. This has to be a string, and not a number.

 

=NAPlaceholder()

 

Below cell D1 has =NAPlaceholder("…") and cell D2 has =AverageEntryPrice(A2). Cell A2 is a buy limit order, which has not been executed and therefore has no average entry price. Consequently, cell D2 displays “…”.

 

 

 

Order Transaction Per Second Limit parameter sets a maximum number of order transactions per second that XLSTrader can send immediately to the underlying order routing API. Order transactions exceeding this limit shall be delayed. Default value shall be 10. CQG's Gateway has a limit of the maximum number of order transactions per second. This limit is part of account risk settings and by default is 10 transactions / second maximum. Any transactions that exceed this limit are rejected by Gateway.

 

=OrderTransactionPerSecondLimit()

 

 

 

 

Xls Trader Version

 

This particular function presents the version number you are currently running. This is important information for reporting any issues.

 

=XlsTraderVersion()