Login Page - Create Account

Technical Studies Reference


Write Bar Data to File


Description

This study will write the Date-Time, Open, High, Low, Close, Volume bar data that is loaded into the chart, to an output text file and update that file in real-time.

The study data will not be written. Each line in the file will represent one bar in the chart. Therefore, if the chart bars are a 1 minute timeframe, then each line in the data file will be 1 minute.

Only the data that is loaded into the chart will be outputted to the text file. To control the number of days outputted to the text file, adjust Chart >> Chart Settings >> Use Number of Days to Load >> Days to Load.

The file is continuously updated as new bars are added to the chart. The very last bar is not written to the data file since it is not considered complete. Only when there is a new bar added, will the prior last bar will be written. The time stamping of the data in the file will be the same as the times displayed in the chart unless the Use GMT Time Input is set to Yes.

The output filename is by default [symbol]-BarData.txt. The file is written to the Sierra Chart Data Files Folder. To determine the location of the Data Files Folder, select Global Settings >> General Settings. Refer to the Data Files Folder box.

In the case of when the symbol of the chart changes, unless you have set the File Path Input to a specific file name, the output file name will match the current chart symbol and a new file will be created if necessary. Anytime the symbol of the chart changes, or there is a full recalculation, the output file is fully rewritten with all of the data in the chart.

There is only ever one output file for a chart even when that chart is a Continuous Futures Contract chart.

The output file containing the bar and study data is only open, when a write operation is being performed. Otherwise, Sierra Chart does not keep that file open. It is only momentarily open.

When Sierra Chart writes to the file and the file is open during that time, it allows read access from any other process at that time.

If Sierra Chart is unable to open the output file, it means that another process has exclusive write access to it and is not allowing write access.

Also refer to Write Bar and Study Data To File.

Inputs

  • Separator: This Input determines the character that will be used to separate bar data fields in the output text file. The choices are Space, Comma, or Tab.
  • Use GMT Time: When this Input is set to No, the times in the output text file will be the same as displayed in the chart, which are based on the Time Zone setting in Sierra Chart (Global Settings >> Data/Trade Service Settings). If this Input is set to Yes, then the times in the output text file will be in GMT time.
  • Date Format: This Input sets the Date format to use for the Dates in the output text file. There are several choices available.
  • File Path: This is an optional Input to specify the folder and the Filename for the file to write the data to. Leave this blank to use the default. The default folder is the Sierra Chart Data Files Folder, and the Filename is the symbol plus the text: -BarData.txt.

*Last modified Sunday, 30th April, 2023.