forex software

Create and Test Forex Strategies

forex software

fsb:manual:data_files

Data Files

Forex Strategy Builder uses local data to perform historical back test.

The data is stored in text files.1) The program uses this type of files in order to allow users to easily edit or amend the trade rates.

This article explains how the files are named, where they are placed in the directory of the program and how they are formatted.

The forex rates files are not automatically updated.

File Name

Each instrument and forex rate data is in a separate file. These files must be named in a specific way in order to be correctly recognized and loaded by the program.

The file names consist of three parts:

Data File Name

  • the symbol of the currency instrument – it consists of six capital letters (EURUSD, USDCHF, GBPJPY);
  • numeric representation of the time period – this is the number of minutes contained in each period:
           1 Min    –       1
           5 Min    –       5
          15 Min    –      15
          30 Min    –      30
           1 Hour   –      60
           4 Hour   –     240
           1 Day    –    1440
           1 Week   –   10080
  • fail extension - shows the type of the file. Forex Strategy Builder uses files with the .CSV extension. This format means Comma Separated Values and is used to store values in tabular form.

Examples:

   EURUSD1440.csv   -   Eur vs. Usd, period - 1 Day
   USDJPY60.csv     -   Usd vs. Jpy, period - 1 Hour
   GBPCHF15.csv     -   Gbp vs. Chf, period - 15 Min

Data File Format

The data in the text files is stored in rows and columns:

 2008-05-19   19:00   1.5445   1.5456   1.5445   1.5451   43
 2008-05-19   19:15   1.5452   1.5458   1.5451   1.5454   43
 2008-05-19   19:30   1.5453   1.5457   1.5452   1.5455   47
 2008-05-19   19:45   1.5456   1.5465   1.5455   1.5463   56
 2008-05-19   20:00   1.5464   1.5465   1.5459   1.5460   39
 2008-05-19   20:15   1.5459   1.5468   1.5454   1.5454   39

The columns are as follows:

  1. Date (2008-05-19 or 19.05.2008 or 05/19/2008);
  2. Hour (19:15 or 19:15:00);
  3. Open Price (1.5452 or 1,5452)
  4. High Price
  5. Low Price
  6. Close Price
  7. Tick Volume

The columns are separated by interval, tabulation, comma or semicolon.

Each row contains data for one bar only.
The oldest bar is at the beginning of the file.
The newest bar is in the last row of the file.

For programmers, the full data format is as follows:

      SpacePattern  = @"[\t ;,]";
      DatePattern   = @"\d{1,4}[\./-]\d{1,4}[\./-]\d{1,4}";
      TimePattern   = @"\d{1,2}(:\d{1,2}){1,2}";
      PricePattern  = @"\d+([\.,]\d+)?";
      VolumePattern = @"\d{1,10}";

Updating

You can find more information and links in Historical Forex Rates page. It is also accessible from MarketDownload Data menu of Forex Strategy Builder.

For further information on alternative data sources check the related topic in the Forex Forum.

Data Editing

You can add to or edit the forex rates files using any text or tabular editor.

  • Notepad - right click on the file and select Open With from the context menu; then select Notepad from the list of programs;
  • OpenOffice Calc - when you use Calc, a dialog window called “Text Import” emerges. Click on the option Separator options - Separated by and choose Tab;
  • Microsoft Excel - Start Excel, go to the menu Data - Import External Data - Import Data. This will open a dialog window where you need to select the file you would like to import. After you load it, choose the format of the respective column. When ready, press Finish.
1)
The files contain information - letters and numbers in sequences. You can easily edit the files with a simple text tool like Notepad