Exporting data using command line options

Modified on Wed, 24 Aug 2022 at 05:08 PM

Note: this article is meant for users with a working knowledge of the Windows command line, file system, application arguments and so on. If you are not familiar with these, it would be a good idea to read some material about them before proceeding.

Starting with v2.2.41, the Tick Data Suite permits exporting tick data using the command line. Bar data export is also possible starting with v2.3.0.

If you have tick data or bar data export tasks that you find yourself performing frequently it is quite easy to create batch files or shortcuts that perform the required exports automatically.

In order to export tick data, you must first configure the export format. You can do that by opening the Symbol operations dialog in Tick Data Manager, navigating to the Export ticks tab, configuring the export as desired and finally clicking the Save configuration button. Make a note of the saved file name and location - you will need that for the command line parameters.

For exporting bar data, you must also save a format configuration file in a similar fashion, the difference being that you configure it in the Export bars tab instead of the Export ticks tab.

Once you have the export format file, the following command line options are available for exporting data:

  • /eformat:file_path_and_name - used to specify the export format file. Examples:
    /eformat:"D:\export files\custom_tick_export.tcf" - if there's a space in the file name or path, be sure to quote it.
  • /output:folder_path - used to specify the output folder. The exported files will be automatically named based on the source, the symbol and the exported date period; for bar data, the file names will also include the timeframe. Any existing files will be overwritten. The folder specified must already exist. Examples:
    /output:"D:\export folder" - if your path has spaces in it you need to quote it. Be sure not to add a trailing backslash in this case because it would get interpreted by the shell as an escape character for the following quotation mark.
  • /export:source:symbol[,symbol2,symbol3,...]:[start_date-end_date] - exports the tick data for the specified symbols from the specified tick data source. If a time period is specified, the export is limited to that time period. The dates specified must use the format YYYY.MM.DD. Examples:
    /export:Dukascopy:EURUSD - will export the all the EURUSD tick data downloaded from Dukascopy.
    /export:TrueFx:GBPUSD,USDJPY:2010.01.01-2011.12.31 - will export the GBPUSD and USDJPY tick data downloaded from TrueFx for the 2010-2011 period.
    /export:FxOpen:* - will export all the data for all FxOpen symbols that have any downloaded data.
  • /dontquit - by default, the Tick Data Manager will quit when done exporting so that a batch file can continue with other activity. If you would like to prevent this behavior and have the Tick Data Manager continue to run when it has finished processing, you need to pass the /dontquit command line parameter.

Complete example:

"C:\Program Files (x86)\eareview.net\Tick Data Suite\Tick Data Manager.exe" /export:Dukascopy:EURUSD,GBPUSD:2019.01.01-2019.12.31 /eformat:C:\export\format.tcf /output:C:\export

"C:\Program Files (x86)\eareview.net\Tick Data Suite\Tick Data Manager.exe" /export:Dukascopy:USDJPY /eformat:C:\export\format.bcf /output:C:\export

For non-Forex symbol categories you may need to run Tick Data Manager and hover the mouse cursor over the symbol in order to find its storage path which is what should be specified in the export command line. For example, for the High Grade Copper symbol from Dukascopy the path is COPPERCMDUSD.

These options can be added to the target part of a shortcut or alternatively a .bat file can be created.

Finally, it's important to note that attempting this procedure will fail if you already have an instance of the Tick Data Manager running.