How do I import external historical data from a text or csv file?

Importing Historical Data

The import function in Investor/RT enables the user to import historical data of various time frames. In addition, ticker symbols and other instrument properties may be imported in a variety of formats to define new instruments for Investor/RT and/or to define quote pages. The Import Window is accessible via the Data menu (or the ALT+7 Shortcut).

Part 1) Importing historical data (daily, weekly, monthly, or intra-day data) from an ASCII text file

Import of historical daily, weekly, monthly, or intra-day data ("Tick or Minute bar") for any type of instrument (futures, indexes, stocks..) is achieved by selecting one of the first 4 options of the Import data window menu 

When importing such historical data, you must specify via the File Format menu, how the data in the input file is arranged. When the desired format is not one of the formats available in the menu, click on the setting Icon '(or go to File > Preferences > QuotePage > QuotePage Formats) to create a format that lists the incoming data fields in order. The newly format name will then be available for selection in the Data > Import window.

Specifying the instrument name:

Usually, each line in the input text file contains the ticker symbol (in that case, Historical data for several tickers may be imported from a single file). If there is no ticker symbol in the format you use to import the data, Investor/RT will assume all data is for one ticker and will prompt the user to specify the symbol. If the corresponding option is checked, the ticker symbol can be also obtained from the file name. It is also possible to import all files  at once from a ser specified folder

About the date and time format:

Each line in the ASCII text file must have a date (or date/time). Dates may be specified in yymmdd format or mm/dd/yy format. When importing tick data Investor/RT accepts a time indication following the date, e.g. mm/dd/yy hh:mm:ss, or mm/dd/yy hh:mm. An optional checkbox is available when using input files relying on european format (dd/mm/yr or yrddmm). Finally, Timestamp should be based on your Investor/RT timezone settings (as set in the Sessions Preferences window), so a checkbox allows you to shift the intraday time by a given number of hours.

Herebelow, you will find the typical list of items that are required for importing

  • Any OHLCV(OI) type of bar data (ie 1 min bar, daily, weekly or monthly bar data) : see the "Import Format" on the Left (Open Interest is optional and possibly only relevant to Daily data import)
  • Any tick by tick data ("Import _Tickdata" on the right).  Please note that for tick data, the bid and ask prices are optional but required if you want to use any Investor/RT features based on the Bid/ask delta (Volume Breakdown, Footprint, etc.). For information, very Large tick data files may be imported at once (even if the process may take several minutes). For backtesting purposes, some users have successfully imported futures tick data from text files with a size up to 20 or 30 Gigabytes. 

Additional tools relevant when importing stock data:

The Stock Split Finder indicator may be added on a chart (or on a scan syntax) to locate possible splits

Adjusting past data for split: when importing tick data for stocks that have not been corrected for past splits, Investor/RT offers an "Adjust for Splits" feature that can be found in the File > Functions menu. Herebelow an example for correcting imported historical data that was not adjusted for the past 10:1 NVDA split in June 2024

    Part 2) Other (non-historical) data import features

    The "Ticker Symbols" import feature is discussed on this dedicated support page

    The "Import Current Quotes/other data" features (from ASCII text files) allow for importing current prices and other properties for existing instruments. By specifying the input format name (see File > Preferences > QuotePage > QuotePage Formats) the user controls how the input ASCII file is interpreted, knowing that alphanumerical or text properties may be imported, as long as it is associated with an existing QuotePage items. This option will be typically used to import he following type of data

    • Any fundamental data linked to an instrument (stock or futures). For the record, DTN IQ feed provides for stock instruments a long list of such data that can be reviewed by right-clicking on the stock ticker cell on a QuotePage and by selecting the "Get Info" menu
    • More generally, any relevant alphanumeric or text value that you may import from a third-party database and store into a User or Text Variables (there are 512 V#s and 128 T#s variables available) if a dedicated quotepage items/instrument properties doesn't exist

    The data in the input file must have each field separated by commas or tab characters.

    If you have a historical or current quote data file and you need assistance setting up the format to bring the data into Investor/RT, open a support ticket and include a few sample lines from the file you wish to import. We will assist you with setting up the import format (quotepage format).

    Remark: when you have completed the import process (with the current quotes/other market option), the same format name may be used to create a dedicated quotepage to see just those data columns imported:  just create a new quotepage, switch the format of the that quotepage to the format name you used to perform the import by right click on any column title and selecting "Change Format" at the bottom of the pop up menu and select your format among the list (that will appear as highlighted in the screenhot below)

    Part 3) Other ways of importing and sharing spot data / market price levels through dedicated Investor/RT indicators

    Please refer to the following indicators  

    Part 4) Legacy feature: importing daily historical data in Metastock format

    For the record, Investor/RT does not support the import of intraday data from Metastock or any connection to the most recent real time metastock datafeed. Only End Of Day data import in Metastock format has been implemented back in early Investor/RT release (I/RT 3.0 in 1998 !). This EOD import data feature is not officially supported anymore. However, for long-term Investor/RT subscribers, it can be still activated by setting the LegacyMetastockImport configuration variable to true. When done, when selecting the "Daily Historical Data" import data option, 3 MetaStock File Type entries will appear to import historical daily data (and/or ticker symbols) stored in MetaStock format: MetaStock List Symbols, MetaStock One Symbol, and MetaStock All Symbols.

    • MetaStock List Symbols allows the user to quickly create a quote page for the symbols (instruments) in a MetaStock directory. MetaStock data files are organized in folders (directories) which contain a ".dat" file for each security, and an index file called "MASTER" which contains a list of the instruments in the directory. Click Import and then select the "MASTER" file you wish to import. All symbols defined in the MetaStock Master File are then setup automatically in Investor/RT and a Quote Page is created for those instruments. You may provide your own name for the newly created quote page.
    • MetaStock One Symbol allows you to import the historical data for a single instrument from a MetaStock directory. Click Import and select the MetaStock Master file you want. You will then be asked to enter the ticker symbol to import. Type in the ticker symbol (in uppercase) and press OK. Investor/RT will search the MetaStock master file for the entered symbol and import its historical data. It is not necessary to pre-define the symbol. If the symbol is not yet defined, Investor/RT will define it automatically.
    • MetaStock All Symbols will define all of the instruments, create a quote page and bring in all of the historical data for each symbol into Investor/RT. Click Import and identify the Master file to import and Investor/RT does the rest.