Field Order - 3rd Party Data
In order to plot the data, TradeStation needs to know what each data field in the file represents. The most common way to identify each data field is to include a header line as the top line in the 3rd Party ASCII data file. In addition, you can define field order using an external .dop file that applies a header line to one or more data files. If no header or .dop file is available, you will be asked to specify the field order from the Customize Symbol wizard when the data is first plotted.
Data Field Order methods
There are 4 different field order methods that can be used to specify this information. All methods must follow the same guidelines as the header line described in ASCII 3rd Party Data Guidelines.
- Header Line - This is the most common method that includes the header line at the top of the 3rd party ASCII data file.
- File-Specific Data Order Parameter File - You may want to specify a field order for a specific ASCII data file, but may not want to do it within the data file's header. For example, you may be using a third party software that creates/updates the file which does not include a header. Therefore you would create a file contained in the same folder as the data file and named with the same prefix, but ending in '.dop' (data order parameter). Refer to Data Order Parameter File Guidelines for more information.
Data file: | MSFT.txt |
Parameter file: | MSFT.dop |
For the above files, the header file does take precedence over this file, therefore if the data file has a header and there is a corresponding .dop file, the header line is what is used in the platform.
- Directory-Based Data Order Parameter File - In order to have an easy way to define the field order for all symbols in a directory (when they are the same) without having to create a header line in each data file or create a parameter file for each data file, you can create a directory-based parameter file (ALLDATA.dop). Refer to Data Order Parameter File Guidelines for more information. This method could also be useful when most of the data files have the same field order (thus create a directory-based file) and only a few of the data files don't adhere to that field order. For those that don't, you could either create a header line or a file-specific parameter file, since these do take precedence over the alldata.dop file.
Data files: | Test1.txt |
Test2.txt | |
Test3.txt | |
Parameter files: | Test3.dop |
AllData.dop |
For the above group of files, Alldata.dop would be used for Test1 & Test2. Test3.dop would be used for Test3.
- User Interface- If none of the above methods are used, you will be prompted for this information when you choose to plot that symbol.
Data Order Parameter file guidelines
The Data Order Parameter file is used to determine the field order for data in files that may not include their own header line. It can be thought of as a header line that's detached from the data file. Here are the requirements for the Data Order Parameter file:
- The file must only contain one line of data, and it may be followed by one carriage return (although it is not required that it be followed by a carriage return).
- Each field name can be enclosed within quotation marks, but they are not required.
- Each field must be separated from each other field using one of the valid delimiting characters - a comma, tab, or space.
- These fields can be arranged in any order in the .dop file, but must match the field order of the data.
The acceptable fields are as follows:
Field Name | Short Name | Purpose |
Date | Used to indicate the date of the bar or tick | |
Time | Used to indicate the time of the bar or tick | |
Open | O | Used to indicate the open of the bar |
High | H | Used to indicate the high of the bar |
Low | L | Used to indicate the low of the bar |
Close | C | Used to indicate the close of the bar or tick |
Volume | V | Used to indicate the volume of the bar or the Up Volume of the bar |
OpenInt | OI | Used to indicate the open interest of the bar for the Down Volume of the bar |
Other | Used as a placeholder |
Examples of several header lines in a .dop file would be:
- 'Date','Time','O','H','L','Close','Volume','OpenInt'
- Other,Date,Close