Built-in RealTimeToDB Functions

Built-in RealTimeToDB Functions

The real-time field configuration table contains Excel-like formulas for getting data from real-time RTD and DDE servers.

Real-time servers can have no fields about date or time of the data.

In this case, you can use built-in RealTimeToDB formulas to update the database fields.

For example:

TABLE_SCHEMATABLE_NAMECOLUMN_NAMERTD_FORMULA
rtdQuoteDayHistoryTOSSymbol
rtdQuoteDayHistoryTOSDate=Date()
rtdQuoteDayHistoryTOSTime=Time()
rtdQuoteDayHistoryTOSLast=TOS|LAST![Symbol]
rtdQuoteDayHistoryTOSChange=TOS|NET_CHANGE![Symbol]
rtdQuoteDayHistoryTOSBid=TOS|BID![Symbol]
rtdQuoteDayHistoryTOSAsk=TOS|ASK![Symbol]

Thinkorswim thinkDesktop have no date and time fields.
So, to get the quote day history we need to use internal formulas =Date() and =Time().

Note, that the last data update fields are updated using the PC time adjusted to the table time zone, specified in the table configuration.

You can use the 'Eastern Standard Time' time zone for US stock exchanges.

Function List

FunctionResult
=TimeStamp()Returns the current UTC datetime.
=UtcNow()Returns the current UTC datetime.
=Now()Returns the current datetime.
=TableNow()Returns the current datetime adjusted to the table time zone.
=DateTime()Returns the last data update datetime.
=DateTime0()Returns the last data update datetime rounded to 1 second up.
=DateTime1()Returns the last data update datetime rounded to 1 minute up.
=DateTime5()Returns the last data update datetime rounded to 5 minutes up.
=DateTime10()Returns the last data update datetime rounded to 10 minutes up.
=DateTime15()Returns the last data update datetime rounded to 15 minutes up.
=DateTime20()Returns the last data update datetime rounded to 20 minutes up.
=DateTime60()Returns the last data update datetime rounded to 60 minutes up.
=Date()Returns the last data update date.
=Time()Returns the last data update time.
=Time0()Returns the last data update time rounded to 1 second up.
=Time1()Returns the last data update time rounded to 1 minute up.
=Time5()Returns the last data update time rounded to 5 minutes up.
=Time10()Returns the last data update time rounded to 10 minutes up.
=Time15()Returns the last data update time rounded to 15 minutes up.
=Time20()Returns the last data update time rounded to 20 minutes up.
=Time60()Returns the last data update time rounded to 60 minutes up.