Importing Data

Overview

If you have historical market data available in files (e.g., because you purchased a database in the past), then you can choose to import this data into IQBroker. This is much faster than downloading the data over the internet using a Data Connection, and it might even eliminate the need to subscribe to a data service.

You can import data into IQBroker using two file formats:

Create a Data Connection

Create a new Data Connection of the type you want (ASCII or MetaStock). These data connections have the following settings:

ASCII Data Connection Settings


Import From - the directory that contains your data files

Time Zone - how to interpret timestamps

Minute Bars Timestamp - when importing Minutes data, this determines whether the timestamps belong to the beginning or end of the minute.

You don't need to specify the format of the data files. IQBroker recognizes a wide variety of file formats, and it will attempt to auto-detect the format that your files are using.

MetaStock Data Connection Settings


Import From - the directory that contains your data files

Activate the Data Connection

After you have finished creating the data connection, make it the active connection by selecting it in the Connections menu.

From now on, whenever IQBroker needs data it will attempt to get it from your data files.

If you have several collections of data files that require different settings (e.g., a different "Time Zone" setting), then create multiple Data Connections and switch between them as needed.

The imported data is not merged with data from other data providers. In other words, this data is only available while your ASCII or MetaStock data connection is active. If you switch to a different data connection (e.g., IQFeed) and make a historical request, then the requested data will be loaded from the new data connection; IQBroker won't reuse the data it may have found in your ASCII files.

Troubleshooting

If the data you expect doesn't appear then check the Logs tab for errors. The most common errors are:

  • IQBroker can't find a data file with the data that was needed
  • IQBroker doesn't understand the file format of a data file

For example, here's the error that shows up if IQBroker needs the data for "IBM", but can't find a data file with the expected filename ("IBM.txt"):

If IQBroker can't find your data files then check the data connection's settings to make sure that you specified the correct directory. Note that IQBroker will search both the specified directory and all of its subdirectories.