There are many reasons why you might want a TradeStation EasyLanguage program to print data to an external file on your computer.
Tutorial 195 demonstrates how a program can create multiple files on a local computer and store data in each of them.
In this example program, applied to a 1 minute chart, exponential moving averages are calculated and then written to a CSV (Comma Separated Value) file. Every time a new hour begins, a new file is created. The files are named using a combination of the symbol name, the bar interval, the date and the hour, for example: “T195_@ES_1_07-16-23_19.csv.”
The files are created and the data stored using StreamWriter functionality and the data is available to be analyzed in a spreadsheet program.
https://markplex.com/free-tutorials/tutorial-195-storing-data-in-new-files-created-by-the-program/