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


Original text


Original text


}
T4 supports sending data via RTD to Microsoft Excel. RTD is a newer protocol than DDE and offers better performance and reliability. RTD does not require a quote board to be open in T4 in order to stream data. It only requires T4 to be running and the proper data subscriptions to be in place for the T4 user.

To enable RTD, go to the main properties, expand the "General" section, then choose "RTD." On the right side, check the box to "Enable RTD Server." You can change the price format in this section of the menu as well. The default is "Decimal," but hovering over the menu item will provide examples of other price display formats.

Image

Once RTD is enabled, all former "Copy DDE" buttons will show as "Copy RTD." Please note that at this time, charts do not support RTD. Charts will still provide DDE links and DDE and RTD can be used simultaneously in the same Excel sheet. From a Quote Board, click the "Copy RTD" button and then paste into Excel. Once pasted in Excel, RTD formulas can be manipulated to show different markets and data. A list of available fields is outlined at the bottom of this page.

From a Quote Board, you can right click on a market and choose "Copy Market Depth RTD Link" to copy the first 5 levels of depth to Excel. The formulas can be expanded to up to 10 levels of depth after being added to Excel by altering the RTD code in each cell.

At the moment, order entry and revisions are not available via RTD.

Account Fields

Change the ITALIC portions of the syntax to the relevant values for your purposes.

FieldSyntax
AccountID=RTD("t4", , "Account",ACCOUNT,"AccountID")
Name=RTD("t4", , "Account",ACCOUNT,"Name")
Number=RTD("t4", , "Account",ACCOUNT,"Number")
Firm=RTD("t4", , "Account",ACCOUNT,"Firm")
WarningSummary=RTD("t4", , "Account",ACCOUNT,"WarningSummary")
Balance=RTD("t4", , "Account",ACCOUNT,"Balance")
Margin=RTD("t4", , "Account",ACCOUNT,"Margin")
WorkingMargin=RTD("t4", , "Account",ACCOUNT,"WorkingMargin")
FilledMargin=RTD("t4", , "Account",ACCOUNT,"FilledMargin")
WorkingDelta=RTD("t4", , "Account",ACCOUNT,"WorkingDelta")
FilledDelta=RTD("t4", , "Account",ACCOUNT,"FilledDelta")
PL=RTD("t4", , "Account",ACCOUNT,"PL")
OvernightUPL=RTD("t4", , "Account",ACCOUNT,"OvernightUPL")
RPL=RTD("t4", , "Account",ACCOUNT,"RPL")
UPL=RTD("t4", , "Account",ACCOUNT,"UPL")
Status=RTD("t4", , "Account",ACCOUNT,"Status")
Cash=RTD("t4", , "Account",ACCOUNT,"Cash")
NetEquity=RTD("t4", , "Account",ACCOUNT,"NetEquity")
MinBalance=RTD("t4", , "Account",ACCOUNT,"MinBalance")
LossLimitPercent=RTD("t4", , "Account",ACCOUNT,"LossLimitPercent")
LossLimit=RTD("t4", , "Account",ACCOUNT,"LossLimit")
WarningMargin=RTD("t4", , "Account",ACCOUNT,"WarningMargin")
WarningPL=RTD("t4", , "Account",ACCOUNT,"WarningPL")
WarningLL=RTD("t4", , "Account",ACCOUNT,"WarningLL")
WarningWorst=RTD("t4", , "Account",ACCOUNT,"WarningWorst")
WarningThresholdMargin=RTD("t4", , "Account",ACCOUNT,"WarningThresholdMargin")
WarningThresholdPL=RTD("t4", , "Account",ACCOUNT,"WarningThresholdPL")
WarningThresholdLL=RTD("t4", , "Account",ACCOUNT,"WarningThresholdLL")
WarningThresholdWorst=RTD("t4", , "Account",ACCOUNT,"WarningThresholdWorst")
TotalWorkingOrders=RTD("t4", , "Account",ACCOUNT,"TotalWorkingOrders")
TotalWorkingQuantity=RTD("t4", , "Account",ACCOUNT,"TotalWorkingQuantity")
TotalDayBuys=RTD("t4", , "Account",ACCOUNT,"TotalDayBuys")
TotalDaySells=RTD("t4", , "Account",ACCOUNT,"TotalDaySells")
Mode=RTD("t4", , "Account",ACCOUNT,"Mode")
MaxPosition=RTD("t4", , "Account",ACCOUNT,"MaxPosition")
Premium=RTD("t4", , "Account",ACCOUNT,"Premium")
SettlementPL=RTD("t4", , "Account",ACCOUNT,"SettlementPL")
PLPercent=RTD("t4", , "Account",ACCOUNT,"PLPercent")
FeesAndCommissions=RTD("t4", , "Account",ACCOUNT,"FeesAndCommissions")
NetSettlementPL=RTD("t4", , "Account",ACCOUNT,"NetSettlementPL")
NetPL=RTD("t4", , "Account",ACCOUNT,"NetPL")
DayPL=RTD("t4", , "Account",ACCOUNT,"DayPL")
NetLiq=RTD("t4", , "Account",ACCOUNT,"NetLiq")
ImportedNetLiq=RTD("t4", , "Account",ACCOUNT,"ImportedNetLiq")
ImportedNetLiqDate=RTD("t4", , "Account",ACCOUNT,"ImportedNetLiqDate")
PrevImportedNetLiq=RTD("t4", , "Account",ACCOUNT,"PrevImportedNetLiq")
PrevimportedNetLiqDate=RTD("t4", , "Account",ACCOUNT,"PrevImportedNetLiqDate")
Favorite=RTD("t4", , "Account",ACCOUNT,"Favorite")
NetEquitySettle=RTD("t4", , "Account",ACCOUNT,"NetEquitySettle")
NetEquityMidPoint=RTD("t4", , "Account",ACCOUNT,"NetEquityMidPoint")
NetEquityTheo=RTD("t4", , "Account",ACCOUNT,"NetEquityTheo")
UPLPrevDayHeldSettleSettle=RTD("t4", , "Account",ACCOUNT,"UPLPrevDayHeldSettleSettle")
UPLCurDayHeldSettle=RTD("t4", , "Account",ACCOUNT,"UPLCurDayHeldSettle")
UPLTotalSettle=RTD("t4", , "Account",ACCOUNT,"UPLTotalSettle")
UPLPrevDayMidPrice=RTD("t4", , "Account",ACCOUNT,"UPLPrevDayMidPrice")
UPLCurDayMidPrice=RTD("t4", , "Account",ACCOUNT,"UPLCurDayMidPrice")
UPLTotalMidPrice=RTD("t4", , "Account",ACCOUNT,"UPLTotalMidPrice")
UPLPrevDayTheo=RTD("t4", , "Account",ACCOUNT,"UPLPrevDayTheo")
UPLCurDayTheo=RTD("t4", , "Account",ACCOUNT,"UPLCurDayTheo")
UPLTotalTheo=RTD("t4", , "Account",ACCOUNT,"UPLTotalTheo")
Notifications=RTD("t4", , "Account",ACCOUNT,"Notifications")

Position Fields

Change the ITALIC portions of the syntax to the relevant values for your purposes.

FieldSyntax
AverageOpenPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"AverageOpenPrice")
Buys=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"Buys")
Sells=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"Sells")
DayBuys=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayBuys")
DaySells=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DaySells")
WorkingBuys=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"WorkingBuys")
WorkingSells=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"WorkingSells")
UPL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPL")
RPL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"RPL")
UPLTrade=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLTrade")
OvernightUPL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"OvernightUPL")
TotalBuyFillPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"TotalBuyFillPrice")
TotalSellFillPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"TotalSellFillPrice")
DayTotalBuyFillPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayTotalBuyFillPrice")
DayTotalSellFillPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayTotalSellFillPrice")
TotalOpenPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"TotalOpenPrice")
TotalOpenVolume=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"TotalOpenVolume")
TotalOvernightPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"TotalOvernightPrice")
OvernightPosition=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"OvernightPosition")
Margin=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"Margin")
PrevMargin=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"PrevMargin")
MP=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"MP")
Premium=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"Premium")
Net=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"Net")
DayNet=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayNet")
PrevNet=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"PrevNet")
Worst=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"Worst")
PL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"PL")
PLTrade=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"PLTrade")
DayPL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayPL")
DayPLTrade=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayPLTrade")
UPLUSD=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLUSD")
UPLTUSD=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLTUSD")
DayRPL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayRPL")
DayRPLUSD=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayRPLUSD")
DayUPL=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayUPL")
DayUPLUSD=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayUPLUSD")
DayUPLTrade=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayUPLTrade")
DayUPLTUSD=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayUPLTUSD")
UPLPrevDayHeldSettleSettle=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLPrevDayHeldSettleSettle")
UPLCurDayHeldSettle=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLCurDayHeldSettle")
UPLTotalSettle=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLTotalSettle")
UPLPrevDayMidPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLPrevDayMidPrice")
UPLCurDayMidPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLCurDayMidPrice")
UPLTotalMidPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLTotalMidPrice")
UPLPrevDayTheo=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLPrevDayTheo")
UPLCurDayTheo=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLCurDayTheo")
UPLTotalTheo=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"UPLTotalTheo")
FeesAndCommissions=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"FeesAndCommissions")
TradeDate=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"TradeDate")
AverageLongPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"AverageLongPrice")
AverageShortPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"AverageShortPrice")
DayAverageLongPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayAverageLongPrice")
DayAverageShortPrice=RTD("t4", , "Position",ACCOUNT,EXCHANGEID,CONTRACTID,MARKETID,"DayAverageShortPrice")

Market Fields

Change the ITALIC portions of the syntax to the relevant values for your purposes. Note that for Depth fields, values from 0 to 9 may be entered to display the 1st through 10th best levels of depth, respectively. Examples below show "Decimal" formatting, but other display formats are available.

FieldSyntax
High=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"High","Decimal")
Low=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Low","Decimal")
Best Bid Price=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BestBid","Decimal")
Best Bid Volume=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BestBid","Volume")
Best Bid Display=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BestBidDisplay","Volume")
Best Offer Price=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BestOffer","Decimal")
Best Offer Volume=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BestOffer","Volume")
Best Offer Display=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BestOfferDisplay","Volume")
Settlement=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Settlement","Decimal")
Held Settlement=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"SettlementHeld","Decimal")
Last Trade Price=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"LastTrade","Decimal")
Last Trade Volume=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"LastTrade","Volume")
Bid Price Depth=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Bid","Decimal","0")
Bid Volume Depth=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Bid","Volume","0")
Bid Display Depth=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"BidDisplay","Volume","0")
Offer Price Depth=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Offer","Decimal","0")
Offer Volume Depth=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Offer","Volume","0")
Offer Display Depth=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"OfferDisplay","Volume","0")
Market Description=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"Description")
Expiry Month=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"ExpiryMonth")
Expiry Year =RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"ExpiryYear")
Total Traded Volume=RTD("t4", , "Market",EXCHANGEID,CONTRACTID,MARKETID,"TTV")

RTD Throttle Interval

The RTD throttle interval determines how often updates are made to Excel. When ExcelTools is installed, the RTD throttle is automatically set to 2000 milliseconds (2 seconds) between calls for new data. Typically, you will never have to change this setting.

Change the RTD Throttle Interval

To set the throttle interval lower through the Excel object model (change from 2000 milliseconds to 500 milleseconds, or 0 seconds to update as fast as possible):

1. Open Excel

2. Open the Visual Basic Editor by pressing ALT+F11, or by clicking Visual Basic Editor from the Macro menu (Tools menu).

3. In the Immediate window (press CTRL+G or click Immediate Window on the View menu), type this code: Application.RTD.ThrottleInterval = 0

4. Make sure your cursor is on the line that you just typed, and then press ENTER.

  Name Size
- RTD.png 11.03 KB

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

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