Exporting and Importing Intraday Data Files
- Alternative Ways to Export Data
- Export and Edit
- Import and Load
- Format of Exported Data
If you are using anti-malware/antivirus software, then be sure to disable the scanning of files with the following extensions: .itxt , .txt , .scid. Otherwise exporting and importing data will be very slow.
The exporting and importing of Intraday data can be used for two purposes. For advanced editing of Intraday data and for importing of data from other sources. If you want to replay charts using Intraday data from other sources, you will first need to Import that data into the Sierra Chart Intraday Data File Format.
For Historical charts (Daily, Weekly, Monthly, Quarterly, Yearly bar time frames), the data is read and written by Sierra Chart in a Text/CSV format. Therefore, there is no need to export or import this data since it is already in a text format.
For more information to work with Historical Daily data, refer to the Text/CSV Data Format page.
Intraday Data Files can be exported to a Text/CSV (comma separated values) format. This is useful for correcting errors in the chart by deleting or correcting the lines of data that contain errors. It is also possible to directly edit the data in the original Intraday data file by selecting Edit >> Edit/Download Data - Intraday on the menu. However, by exporting the data you have the ability to see all of the data in a plain text format at once for more advanced editing. This also gives you the ability to copy and paste data between files as well.
When you export the data, Sierra Chart will convert the Intraday data file into a text file of extension .itxt and it will be opened in a text editor. Changes can be made directly to the text file and then imported back into Sierra Chart, which will convert it back into the standard Sierra Chart Intraday data file format with file extension scid.
If you have Text/CSV data from other sources, then Sierra Chart can directly read this data. Although it is best to import it so you can replay the data.
Note: The Date and Time for each record in an exported file is always in GMT/UTC time, no matter what the Time Zone setting in Sierra Chart is.
Alternative Ways to Export Data
There are two alternatives to export data.
- Use the Write Bar Data to File study. This will export all of the chart data in the timeframe that the bars are currently set to, to a text file. However, the very last bar will not be written since the study does not consider the last bar as a complete bar and an incomplete bar will not be written to the output data file. If a chart is set to 5 minutes per bar, then each record in the text file will be 5 minutes. This study gives you the option to write the Date-Time using the Time Zone setting in Sierra Chart or in GMT/UTC time.
- The other alternative is to use the Spreadsheet Study. When you apply the Spreadsheet Study to a chart, all of the chart data and study data as it exists on the chart, is outputted to a Sierra Chart Spreadsheet. You can then use that data for various purposes. You can easily copy it and paste it to a text file. Or just save it as a text file through File >> Save As.
Export and Edit
To export an Intraday data file to a text file, follow the steps below.
The exported data will be all of the data that is in the Intraday data file and will not be exactly equivalent to the bars currently displayed in the chart. If you want to export the data exactly as it appears in the chart, then use the Edit >> Export Bar Data to Text File.
The timeframe of the data exported depends upon the particular Data/Trading service being used, the historical data provided by that service, the associated historical data settings, and the Intraday Data Storage Time Unit setting. The data records will not necessarily all be a consistent timeframe and can vary from 1 trade to 1 minute per record line. This is going to be especially true when using Interactive Brokers or DTN IQ Feed.
- Open an Intraday chart or go to an existing Intraday chart.
- Select Edit >> Export and Edit Intraday Data on the menu. Sierra Chart needs to be disconnected (File >> Disconnect) from the feed in order to export an Intraday data file. You can also use the Edit >> Export Intraday Data to Text File, to just export the file to a .txt file and not automatically open the file in a text editor.
- You will be prompted for a filename for the text file to export it to, choose a filename or accept the default. Press the Save button to accept your selection.
- The data will be exported to the text file and it will be in a comma separated value format. Sierra Chart will automatically open the file with the Daily Data Editor specified in the Global Settings >> General Settings window. The default editor is the text editor supplied with Sierra Chart.
- When you are finished editing the file, if you want to edit the file, Save the file and follow the Import and Load instructions to import and load the data into the chart.
- For an understanding of the exported data, refer to Format of Exported Data.
- In the case of Continuous Futures Contract charts, only the data for the current symbol of the chart will be exported. Not the prior contract months. If you want the prior contract months, you need to use the Export Bar Data to Text File command instead. However, that will not export the underlying data, only the bar data.
Import and Load
To import an Intraday data text file, follow the steps below.
- Sierra Chart needs to be disconnected from the data feed by selecting File >> Disconnect in order to import an Intraday data file.
- To be able to import an Intraday chart data file in a text format, it must be located in the Data Files Folder. The path to the Data Files Folder can be determined through Global Settings >> General Settings >> Data Files Folder. So be sure the file to import is located in that folder. It must be.
- The data file to be imported needs to be in the Text/CSV Data Format. The data will already be in the correct format if the data was exported from Sierra Chart. Refer to the Text/CSV Data Format page for the details.
- Select Edit >> Import and Load Intraday Data on the menu.
- There will be a prompt for an Intraday data text file to import. By default, the file name is based upon the same symbol as the active chart.
- After you choose the file you want to import, press the Open button to open the file.
- The next prompt is for the Import Settings. Select the Line Format. Normally you should use Auto-Detect. If you know the specific format of the data being imported, you can select it. In the case of CQG time and sales data you need to expressly select CQG Time and Sales Data.
- Select the appropriate File Handling option. In most cases you will choose the option to Overwrite the existing file.
- Sierra Chart will import the Intraday data text file into a standard Intraday data file format with the file extension .scid with the same symbol as the original Intraday data text file.
- After a successful import, Sierra Chart will either reload the currently opened chart if it is the same symbol as the imported Intraday file, or open the imported data file in a new chart window.
- If you are importing data with timestamps other than in GMT/UTC, then you must adjust the timestamps of the data after you do the import by using the Adjust Data feature. You will need to perform a Time Adjustment on the data.
Format of Exported Data
The format of the exported data is as follows: Date, Time, Open, High, Low, Last, Volume, NumberOfTrades, BidVolume, AskVolume.
In the case of when a data record consists of 1 tick/trade or Bid/Ask update records recorded with -BID_ASK_TRADE_SYNC, the NumberOfTrades field will be set to 1 in this case, the Open field is equal to the last trade price, the High field is equal to the Ask price, the Low field is equal to the Bid price, and the Last field is equal to the last trade price. The Volume field is equal to the volume of the trade.
The time zone of the Date and Time values in the exported data are in UTC (Universal Coordinated Time). The millisecond portion of the time acts as a counter when there are multiple trades within the same second in the case of when there is tick by tick (trade by trade) data being exported.
Intraday data text files have the extension .itxt or .txt. The formatting of the file is straight-forward and very easy to edit. All fields can either be separated by commas or tabs. By default they are separated by commas. The first line always contains the header which explains all of the fields:
Date, Time, Open, High, Low, Last, Volume, Number of Trades, BidVolume, AskVolume
The Date is formatted as YYYY/MM/DD. The Time is formated as hh:mm:ss. All other fields are standard floating-point or integer numbers. If you are importing data from a source other than data exported by Sierra Chart, then there are various Date, Time and record formats that are supported. For complete information, refer to the Text/CSV Data Format page.
The Date and Time for each record in an exported Intraday data text file is always in GMT/UTC time, no matter what the Time Zone setting in Sierra Chart is.
*Last modified Sunday, 10th November, 2019.