Welcome Guest, you are in: Login
CTS Futures
Home
Pricing
Market Data
FAQ
Videos

T4 Desktop
User Guide
Scripting Guide
Release Notes

Mobile and Web
T4 Mobile for Android
T4 Mobile for iOS
T4 Mobile for Browser
T4 WebTrader

Admins
T4 Admin Guide
MiFID II/MiFIR

Developers
API 4.7 Guide
FIX API
API 4.0 Guide
API 4.0 Reference


Original text


Original text


DDE - Controlling T4 via DDE Commands

RSS
You can control some aspects of the T4 frontend via DDE commands. These are aimed at people programming applications within Excel that interact with T4.

Opening a Contract Window

You can cause T4 to activate or open a Contract window with a specific market displayed. To do this you need to enter the following in a cell:

=T4Screen|'CW_<MarketID>'!SHOW

where <MarketID> is the id of the market to display.

e.g. =T4Screen|'CW_CME_20130700_OZCN3_SPACE_C0680'!SHOW

Sending this command will cause the frontend to look for the most recently used Contract window for that Contract and bring it on top of any other application, making the specified market the active market. If no Contract window is found for that Contract then it will open a new Contract window and display it with that market active.

If you wish to repeatedly display the same market (e.g. user clicks a cell to display the contract window, then closes the contract window and clicks the cell again) then you need to replace the above cell contents with:

=T4Screen|'CW_<MarketID>'!CLEAR

where <MarketID> is the id of the market.

This clears out the last command processed and will allow the previous command to be sent again as a new command.

If the command succeeds then the value '<Command Succeeded>' will be returned to Excel, if the market is not found then '<Market Not Found>' is returned.

Changing the DDE Advertise Interval

You can change the timer interval that DDE advertisements are sent on. An advertisement is sent when a piece of data you are interested in has changed, e.g. last trade price. This is set at 10ms by default. If you want to slow down the updates then you can change this to be anything up to 60,000ms.

To change the timer you need to enter the following into a cell:

=T4Screen|'TMR_<Interval>'!SET

where <Interval> is the timer interval to set, in milliseconds, between 10 and 60000.

e.g. =T4Screen|'TMR_500'!SET will set the timer interval to be 500ms.

If the command succeeds then the value '<Command Succeeded>' will be returned to Excel.

If you close T4 desktop and reopen it then you would need to execute this command again for it to take effect.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

111 W. Jackson Blvd., Suite 1408, Chicago, IL 60604

© 2009-2017 Cunningham Trading Systems LLC All rights reserved.