ASCII 3rd Party Data Guidelines

Symbol data from an external ASCII file can be read by TradeStation as long as the text information in the file is properly formatted. This topic provides information about customizing the data fields and optional header in a 3rd party ASCII data file.

Each ASCII file may only contain data for a single symbol.

Each line of data in the file must be followed by a carriage return.

Each field in a line must be delimited by a comma, tab, or space.  No other delimiters are permitted.

An optional header line may be included in the file to define the order of the fields on each line within the file.

The header must be the first line of the file.

The following table lists acceptable field names:


Field Name Short Name Purpose
Date   Date of the bar or tick
Time   Closing time of the bar or tick
Open O Opening price of the bar
High H High price of the bar
Low L Low price of the bar
Close C Closing price of the bar or tick
Volume V Volume of the bar
OpenInt OI Open Int of the bar
Other   Reserved as placeholder

An example of a header line and matching data would be:

"Date","Time",O,H,L,"Close","Volume","OpenInt"

12/12/2003,1340,53,55,48,49.200000,0

The Date must be entered using one of the following formats:

MM/DD/YY MM-DD-YY MM.DD.YY  MMDDYY
MM/DD/YYYY MM-DD-YYYY MM.DD.YYYY MMDDYYYY
YY/MM/DD YY-MM-DD YY.MM.DD YYMMDD
YYYY/MM/DD YYYY-MM-DD YYYY.MM.DD YYYYMMDD
DD/MM/YY DD-MM-YY DD.MM.YY DDMMYY
DD/MM/YYYY DD-MM-YYYY DD.MM.YYYY DDMMYYYY

When using a two digit year, the years less than 30 are assumed to be 21st century and the years 30-99 are assumed to be 20th century.

All times need to be in exchange time, in 24 hour format and can be entered using one of the following formats:

HHMMSS HH:MM:SS
HHMM HH:MM

Examples of time formats would be:

11:15:04 AM can be entered as 111504 or 11:15:04

2:20:36 PM would be entered as 142036 or 14:20:36

3:30 PM would be entered as 1530 or 15:30

  • The file cannot contain any characters besides letters, numbers, the permitted delimiters (comma, tab, and space), the permitted date and time separators, and carriage returns.
  • The file name limit is a maximum of 18 characters including prefix and extension such as ABC:1234567890.CSV
  • The symbol name should not be included in the data file itself. However, if it is, one can have it ignored through the use of the 'Other' field in a header file. The symbol name, however, should be a part of the file name since this is what will be assumed as the symbol in the platform.  E.g. MSFT.txt : MSFT will be assumed to be the symbol name.
  • The two mandatory fields are Date and Close. Other fields that may be added to the file are optional.
  • The fields Open, High, and Low must all be included if any one of them is included (e.g. you couldn't just have Date, Open, High, and Close).
  • While either Volume or Open Interest can be 0, any line that has 0 for Open, High, Low or Close will be ignored.
  • A data file must contain at least 1 line of data in order to be valid. This line is in addition to the header, if there is a header (since the header is optional).
  • All dates and times must be in forward chronological  order (oldest date/time to newest date/time).
  • In the case of daily data, no duplicate dates are allowed. In the case of intraday data, no duplicate times are allowed.  In the case of tick data, there are no such restrictions. Acceptable file intervals are:
    • 1 tick:  Any file that is detected to be a tick file should be presumed to be a 1 tick file
    • 1 minute:  Any file that is detected to be an intraday file should be presumed to be a 1 minute file
    • Second
    • Daily
    • Weekly
    • Monthly