RTD DB Database Templates
As outlined in the Concept, the configuration steps include:
- Creating a database
- Creating data tables
- Creating ticker tables
- Creating configuration tables
- Configuring formulas
- Configuring data tables
- Configuring the connection string
The package includes ready-to-use templates for thinkorswim desktop and various database platforms in the Database Templates
folder of the download package.
Supported database platforms include:
- Microsoft SQL Server
- MySQL
- PostgreSQL
- SQLite
To configure a database using a template, follow these steps:
- Create a database on your target server if necessary.
- Navigate to the folder for your target database platform, such as Microsoft SQL Server.
- Review and run the
install.sql
file to create configuration tables. - Open the
templates
folder. - Navigate to the folder for your target trading platform, such as
TOS.RTD
. - Review and run files like
tos_stock_list.sql
andtos_option_list.sql
to create ticker tables. - Populate the newly created tables, such as
tos_stock_list
andtos_option_list
. - Review and run files like
tos_historical_prices.sql
ortos_option_data_15m.sql
to create data tables and configure formulas. - Set up the connection string via Connection Manager or directly in the application settings.
Additional tables can be added in step 8 at a later time.
Each data table script file, such as tos_option_data_15m.sql
, has the following structure:
- The data table
CREATE TABLE
statement - One row of
real_time_tables
configuration - Multiple rows of
real_time_formulas
configuration
These files can serve as templates for other tables.
Refer to the following topics for information about available tables: