Login Page - Create Account

Text/CSV Data Format


General

Sierra Chart can read data in a Text/CSV format. This data can be Daily or Intraday data. The Text/CSV format is a plain text readable file format that can be viewed, edited, or created with any text editor or Spreadsheet program.

This is the most widely used format for market price data. Each symbol has its own file. Sierra Chart Daily data for Historical charts is stored in a Text/CSV format.

For Intraday data, Sierra Chart has its own non-text format. However, it is also possible to open Text/CSV Intraday data files directly.

All chart data files that you want to open in Sierra Chart, must be located in the Data Files Folder specified in Global Settings >> General Settings.

A Text/CSV data file contains lines of data for a symbol. The various supported formats for the data lines in the file are specified in the Supported Data Line Formats section. The order of the data must be from earliest to latest. A data line can be data for one day, one minute or a single tick.

Each field of data on a data line needs to have a delimiter between them. This can be a comma, tab character or semi-colon.

The end of line terminator needs to be either a carriage return line feed (CRLF), or just a line feed (LF). Either one will work.

When Sierra Chart reads a chart data file in a text format, it will check to see if the file format is valid. If the file format is not valid, then there will be an error when reading it. The first line is always assumed to be the header.

Intraday data contains data lines that have a time period less than one day. For example, the period of the data lines could be 1 Minute, 1 Second or 1 Tick. For the required data line format, refer to the Supported Data Line Formats section. To open an Intraday Text/CSV file you must use File >> New / Open Historical Chart and the file must be in the Sierra Chart Data Files Folder.

Although it is possible to open Intraday data in a Text/CSV format, it is recommended you Import the data so that replays of the Intraday data are possible.

Manually Creating a Data File

Run a Text Editor like Windows Notepad. Enter or paste data into the editor following the Text/CSV format as documented in the Supported Data Line Formats section.

Save the file using a .dly (standard Daily data file extension) or .txt extension. To open this chart in Sierra Chart, select File >> New/Open Historical Chart on the menu.

Select Edit >> Edit Data - Historical on the menu to open the file for editing to add to the file or edit the data at any other time after initially creating the data file.

All chart data files that you want to open in Sierra Chart, must be located in the Data Files Folder specified in Global Settings >> General Settings.

Supported Data Line Formats

The lines listed below are called Headers. The very first line of the data file it is assumed to be the Header.

Each line after the Header line is called a Data Line. The following formats for the Data Lines are supported.

Depending upon the format of the Data Line, the Header may be required. It is required if the Header is specified to be required. If it is not required, then it does not have to be present.

The letters in a Header are not case-sensitive.

The field delimiter can be a comma, tab character or semi-colon.

  • Date, Open, High, Low, Close (Header is optional.)
  • Date, Open, High, Low, Close, Volume (Header is optional.)
  • Date, Open, High, Low, Close, Volume, Open Interest (Header is optional.)
  • Date, Time, Open, High, Low, Close, Volume (Header is required.)
  • Date, Time, Open, High, Low, Close, Volume, Open Interest (Header is required.)
  • Date, Close (Header is optional.)
  • Date, Close, Volume (Header is optional.)
  • Symbol, Date, Open, High, Low, Close, Volume (Header is required.)
  • Symbol, Date, Open, High, Low, Close, Volume, OpenInterest (Header is required.)
  • Symbol, Date, Time, Open, High, Low, Close, Volume (Header is required.)
  • Symbol, Date, Time, Open, High, Low, Close, Volume, Open Interest (Header is required.)


  • Date, Time, Open, High, Low, Close (Header is optional for Intraday data.)
  • Date, Time, Open, High, Low, Close, Volume (Header is optional for Intraday data)
  • Date, Time, Open, High, Low, Close, Volume, Number of Trades, Bid Volume, Ask Volume (Header is optional. Intraday data only.)
  • Date, Time, Unused, Ask, Bid, Close, Volume, Number of Trades, Bid Volume, Ask Volume (Header is required. Intraday data only. "Unused" values need to be set to 0 and be present.)
  • Symbol, Date, Time, Open, High, Low, Close (Header is required.)
  • Symbol, Date, Time, Open, High, Low, Close, Volume (Header is required.)
  • Symbol, Date, Time, Open, High, Low, Close, Volume, Number of Trades, Bid Volume, Ask Volume (Header is required. Intraday data only.)
  • Date, Time, Close (Header is optional. Intraday data only.)
  • Date, Time, Close, Volume (Header is optional. Intraday data only.)
  • Symbol, Date, Time, Close (Header is required. Intraday data only.)
  • Symbol, Date, Time, Close, Volume (Header is required. Intraday data only.)
  • UNIXDateTime, Price/Close, Volume (Header is required. Supported when importing Intraday data only. Refer to UNIX Date Time Format.)
  • UNIXDateTime, Price, VolumeAsFloat (Header is required. Supported when importing Intraday data only. Refer to UNIX Date Time Format.)
  • UNIXDateTime, Open, High, Low, Close, Volume (Header is required. Supported when importing Intraday data only. Refer to UNIX Date Time Format.)

Date Format

The Date format can be any of the following:

  • MM/DD/YY - Example: 1/14/07 or 01/14/07.
  • YYYY/MM/DD - Example: 2007/1/14 or 2007/01/14.
  • YYYY-MM-DD - Example: 2015-01-01.
  • YYYYMMDD - Example: 20070114.
  • YYMMDD - Example: 070114.

Year can be either 2 or 4 digits. 2 digit years with values from 00 to at least 49 will be interpreted as beyond the year 2000 and not 1900.

Time Format

The Time Zone of the times in a text file must be in UTC (Coordinated Universal Time).

The time format can be any of the following:

  • HH:MM:SS (Hours:Minutes:Seconds)
  • HH:MM (Hours:Minutes)
  • HH:MM:SS.MSS (Hours:Minutes:Seconds.Milliseconds)
  • HHMM (HoursMinutes)
  • HHMMSS (HoursMinutesSeconds)
  • HHMMSSMSS (HoursMinutesSecondsMilliseconds)

The time field is only required for Intraday chart data. It is optional for historical Daily data.

HH = Hours. MM = Minutes. SS = Seconds. MSS = Milliseconds.

When colons are used, the Hours, Minutes and Seconds can be single digits. If colons are not used, only the hour can be a single digit but it is always recommended to use two digits anyway.

UNIX Date Time Format

A UNIX Date-Time format is an integer UNIX time value with a GMT/UTC time zone. The UNIX time values used in text files do not contain milliseconds.

For example, the human time: Thursday, 01 Jan 2015 00:00:00 GMT in the UNIX time format is "1420070400".

An example data line in the format UNIXDateTime, Price/Close, Volume is 1420070400, 110.5, 2500.

A good website to convert to/from UNIX times is www.epochconverter.com.

Example for Daily Data

Date, Open, High, Low, Close, Volume, OpenInterest
2013/07/01, 97.625, 98.625, 97.375, 98.375, 1344600, 0
2013/07/02, 98.25, 99.375, 98.125, 99.125, 1209600, 0
2013/07/03, 98.75, 98.875, 98.125, 98.125, 967100, 0
2013/07/04, 98.125, 99.25, 97.875, 98.625, 785000, 0

Example for Intraday Data

Date, Time, Open, High, Low, Close, Volume
2013/06/10, 09:45, 19.17, 19.18, 19.16, 19.17, 5000
2013/06/10, 09:46, 19.16, 19.16, 19.13, 19.16, 2600
2013/06/10, 09:47, 19.17, 19.17, 19.13, 19.14, 8400
2013/06/10, 09:48, 19.13, 19.14, 19.05, 19.08, 8400
2013/06/10, 09:49, 19.08, 19.08, 19.04, 19.04, 8100

Notes

  1. A chart data file is determined to contain Intraday data if there are repeating dates within the first 30 lines of the file. Otherwise, it is assumed to be a historical Daily data file. If you have any problems with a Daily data file being detected as an Intraday data file, then be sure you do not have repeating dates within the first 30 lines of the file.
  2. There can be " (quotation) marks around field names.
  3. All fields on a line must be separated with a comma or a tab character.
  4. Each line of data in a data file can be weekly or monthly data as well. Or any time period. Daily records are best because you can create any time period per bar, Daily or greater, in the chart and easily change between time periods per bar.
  5. Use the symbol for the name of the file. Example: IBM would have the filename IBM.dly . The file extension needs to be dly, txt or prn.
  6. When importing Intraday data, it is necessary for there to be the Number of Trades field to be able to set the chart bars to be based on a Number of Trades, unless the text data specifies the Date, Time, Price, Volume fields only. Volume in this case is optional and Date and Time can be as a UNIX time value.
  7. Importing historical Bid and Ask prices is supported with this format: Date, Time, Unused, Ask, Bid, Close, Volume, Number of Trades, Bid Volume, Ask Volume. Close is the last trade price at the time of the Ask and Bid prices.
  8. When opening Intraday data directly as a text file through File >> Open Historical Chart, the timestamps in the data file are not adjusted to the Time Zone setting in Sierra Chart. They are just displayed as they actually are.

    To have them adjusted to the time zone setting in Sierra Chart, the Date-Times the file need to be in UTC time, and you need to Import the Intraday data.

Bid Volume and Ask Volume

Using Your Own Data and Not Connecting to External Data Service

If you are opening charts using your own data that you have in Text/CSV data files, or if you have imported this data, and you want to prevent Sierra Chart from connecting to an external Data service under any condition and performing a historical data download for the symbol, then select Global Settings >> Data/Trade Service Settings on the menu.

Set the Service to No Service. Press OK.

You should install a separate installation of Sierra Chart for this, separate from the installation of Sierra Chart you use for the other Data and Trading Service you are using. For instructions, refer to Multiple Services.


*Last modified Wednesday, 22nd February, 2023.