Formatting and Importing Text (.csv) Files

Author: Optuma Team Last updated: Mar 7, 2024 08:39


Optuma provides global end-of-day data, as well as the ability to import data from US Federal Reserve FRED database, but if you can’t find what you require or have your own data then it can be imported in to Optuma when saved in a .csv format.

For an example, visit this forum post.

Formatting the .csv File

When importing a .csv file into Optuma it is important to ensure all rows of data are uniformly formatted and the file must be sorted in ascending order, i.e. earliest first.

The following format settings are recommended, especially for the date:

  • Date: dd/mm/yyyy or mm/dd/yyyy. When opened in Notepad the leading zeroes should display eg 06/04/1980 and not 6/4/1980.
  • Time: hh:mm:ss
  • O/H/L/C: Depending on the code they should all be set to between 0 and 5 decimal places. The important thing is that all 4 columns are set to use the same decimal settings.
  • Volume: 0 Decimal Settings
  • OI: 0 Decimal Settings

Once the .csv file has been formatted they should look like the following, depending on the number of columns in your file:

Formatting and Importing Text (.csv) Files 1

Importing the .csv File

Note: Be sure to save the .csv files in a unique folder that only contains the .csv files, eg Documents/Optuma/CSV Files. All .csv files in that folder must have the same format and same columns. If you are importing multiple files with different formats then they will have to be saved in separate folders.

  1. Open Optuma and left-click on the Data menu.

    Formatting and Importing Text (.csv) Files 2

  2. In the menu displayed, left-click the Import Local Data option to open this window:

    Formatting and Importing Text (.csv) Files 3

  3. By default, the C:\ drive will be selected. This will search all subfolders for compatible data. If you would prefer to select a specific folder, such as Documents/Optuma/CSV Files, you can left-click the Change button.

    Formatting and Importing Text (.csv) Files 4

  4. Select the time frame the data is stored in, EOD or Intraday.

  5. Set the format of the Data files to Comma delimited (*.csv)

  6. Enter a name and short name you would like the Exchange to display as in the Data File Manager.

  7. Click the Import button.

  8. Optuma will scan your system for compatible data. Once completed your data will be ready to access.

Opening a Chart from a .csv File for the First Time

The first time you open a chart using a .csv data file, you will be prompted to enter the format settings:

Formatting and Importing Text (.csv) Files 5

Click the Next button and you will be taken to a page where the format settings can be entered:

Formatting and Importing Text (.csv) Files 6

The following options are available:

  • Delimiter: Comma, Tab, or Space. (For a .csv file Comma is used).
  • Currency: Select the currency of the data used in the .csv file (AUD, for example).
  • Date Format: Type the same format in this box as it appears in the Data in File example, as outlined in the image above.
  • Time Format: If using the recommended settings listed above, set to hh:mm:ss
  • Field Order: This section allows you to set the order of the columns as they are set out in the .csv file. A list of compatible column options is listed in the Allowed Fields section below Field Order. Some changes may be required to use the .csv file in Optuma. As an example, if the data is for an EOD time frame only, and no Time column is included, you can remove the Time item from the Field Order section.

    Formatting and Importing Text (.csv) Files 7

  • Data in File: Shows you a sample row from the .csv file for you to reference against as you setup the formatting options.

Once the settings have been adjusted to use the same formatting options as the .csv file, left-click the Finish button. A chart will then display using the data contained within the .csv file.

Reimporting Data

If the imported data isn’t showing correctly check the formatting is consistent in the source file by opening in Notepad (not Excel).

Delete the MTAPS.dat file created in the folder where the .csv files have been saved (this is the formatting file created when the file is first opened). Open the chart again, and you will be prompted to confirm the format again, and a new MTAPS.dat file will be created.

Removing Imported Data

To remove an imported exchange right-click on the name in the Security Selection window and click on Remove Custom Exchange:

Formatting and Importing Text (.csv) Files 8