RTD DB Database Templates

RTD DB Database Templates

As outlined in the Concept, the configuration steps include:

  1. Creating a database
  2. Creating data tables
  3. Creating ticker tables
  4. Creating configuration tables
  5. Configuring formulas
  6. Configuring data tables
  7. 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:

  1. Create a database on your target server if necessary.
  2. Navigate to the folder for your target database platform, such as Microsoft SQL Server.
  3. Review and run the install.sql file to create configuration tables.
  4. Open the templates folder.
  5. Navigate to the folder for your target trading platform, such as TOS.RTD.
  6. Review and run files like tos_stock_list.sql and tos_option_list.sql to create ticker tables.
  7. Populate the newly created tables, such as tos_stock_list and tos_option_list.
  8. Review and run files like tos_historical_prices.sql or tos_option_data_15m.sql to create data tables and configure formulas.
  9. 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:

  1. The data table CREATE TABLE statement
  2. One row of real_time_tables configuration
  3. 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:

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.