Advertisements
EA BUILDER Banner Horizontal

How to Export Data from TradeStation

In this tutorial, you’ll learn how to Export Data from TradeStation. Follow the simple steps and download your historical data!

Let’s start with the easiest method to export data from TradeStation.

Advertisements
ads banner

Let’s take an example case. Let’s say you want to download all Apple stock data in 5 minutes.

TradeStation Download Historical Data WorkSpace

First, create a new workspace called Download 5 minute data and insert an Apple chart.

You can name this WorkSpace “TradeStation Download Historical Data”

How to export data from tradestation apple chart intraday

You have to choose your time frame and data interval: Right-click and select Format Symbol. Choose the 5-minute intraday timeframe and select the number of years you want to download.

Select correct timeframe to export data from tradestation

Now you will have to wait until the TradeStation finishes downloading all the data. At this point, click on “View” and then choose “Data Window” to export data from TradeStation.

select tradestation data window to download intraday data

TradeStation Download Historical Data WorkSpace

A new window will open, and you can choose the destination folder for your TradeStation Download Historical Data.

TradeStation download historical data

The process of export data from TradeStation is finished. This is the file with all your intraday data. This is your “TradeStation download historical data” file.

apple intraday TradeStation download historical data

How to Download Data from TradeStation Indicator

Sometimes, it won’t be enough to grab the TradeStation download historical data. In fact, you will need to export the values of an indicator that you have on the graph.

It’s straightforward; you only need our free EasyLanguage indicator.

Export data from TradeStation is essential when you need to perform statistical analysis on data series. TradeStation is perfect for BackTest, but other software like Excel is much more powerful to analyze data.

If you are searching for price patterns or seasonality, you can do that with our Data Extractor Indicator and Excel.

Let’s take another example. Suppose that I want to export other information besides the intraday data.

In fact, I want to calculate and extract the value of the body of the candle, the value of the RSI indicator, and the ATR indicator.

To prepare our excel sheet, we must first create the header for all the data exported from the tradestation

We’ll show you the code in EasyLanguage to export data from TradeStation for Excel.

You can find many Free Coding Tutorial Here.

With this part of code we created the first part of our spreadsheet:

FileAppend("c:TS_TO_EXCEL"+NameFile1+".txt",
"DATE;TIME;OPEN;HIGH;LOW;CLOSE;VOLUME;BODY;RANGE;RSI;ATR" + NewLine);
apple intraday TradeStation download historical data
Advertisements
ads banner

Now we have to create an indicator to grab all the data from the TradeStation. This is the part of the code that is used to collect data.

// EasyLanguage Indicator from CSV 
If Close[1] <> Close[2] then begin
_Open = Open[0];
_High = High[0];
_Low = Low[0];
_Close = Close[0];
_Volume = Volume[0];
_Body = Abs(Close[0]-Open[0]);
_Range = High[0] - Low[0];
_RSI = Rsi(Close, Rsi_Period);
_ATR = AvgTrueRange(ATR_Period);
End;

In this way, at the end of the bar, the system will write on each variable. Now we only have to transfer this data in our file.txt with this code:

FileAppend("c:\TS_TO_EXCEL\"+NameFile1+".txt",
EETimeToString(Time)+ ";" +
EEDateToString(Date)+ ";" +
numtostr(_Open,4)+";"+
numtostr(_High,4)+";"+
numtostr(_Low,4)+";"+
numtostr(_Close,4)+";"+
numtostr(_Volume,4)+";"+
numtostr(_Body,4)+";"+
numtostr(_RSI,4)+";"+
numtostr(_ATR,4)+";"+
NewLine);

When you attach the Data Extractor Indicator to a chart, TradeStation data creates a text file in the folder “TS_TO_EXCEL”.

You will have to create this folder manually in your C: drive.

how to get data from tradestation export trades Excel MultiCharts
// EasyLanguage Indicator from CSV 
 
Input:
NameFIle1("AAPL"),
Rsi_Period(21),
ATR_Period(14);

Var:
_Open(0),
_High(0),
_Low(0),
_Close(0),
_Volume(0),
_Body(0),
_Range(0),
_RSI(0),
_ATR(0);

If Close[1] <> Close[2] then begin
_Open = Open[0];
_High = High[0];
_Low = Low[0];
_Close = Close[0];
_Volume = Volume[0];
_Body = Abs(Close[0]-Open[0]);
_Range = High[0] - Low[0];
_RSI = Rsi(Close, Rsi_Period);
_ATR = AvgTrueRange(ATR_Period);
End;

FileAppend("c:\TS_TO_EXCEL\"+NameFile1+".txt",
EETimeToString(Time)+ ";" +
EEDateToString(Date)+ ";" +
numtostr(_Open,4)+";"+
numtostr(_High,4)+";"+
numtostr(_Low,4)+";"+
numtostr(_Close,4)+";"+
numtostr(_Volume,4)+";"+
numtostr(_Body,4)+";"+
numtostr(_RSI,4)+";"+
numtostr(_ATR,4)+";"+
NewLine);

This second method is more complicated than the previous one. But with this indicator, however, you are not limited to extracting only prices.

You can extract any data. For example, the Volume Delta or any aggregate data. You can insert any filter and any indicator.

Analyzing the data by examining only the prices is very limiting; with this indicator, the possibilities are endless.

How to use the exported data from TradeStation

You learned how to export data from TradeStation, but how will you use all this data? The easiest and least expensive way to analyze your data is to use Excel.

Open Excel, and in the Menu “Data” click on “Get Data: From Text/CSV”. You also can use this procedure to import the file created with TradeStation Data Window Extract mode.

Excel Import stock data from file CSV

Now you can load the data in excel:

Load Data to Excel from Tradestation indicator

Our spreadsheet:

Spreadsheet data tradestation excel

Now you are free to organize and utilize this data or you can create a chart.

Excel Chart Stock with Tradestation Data Export easylanguage indicator from csv

Do you need help with Excel for Finance? Start with these free tutorials:

How to create a Heikin Ashi Chart in Excel

Excel Stock Chart Tutorial

How to draw a Stock Chart in Excel

Download Auto Extractor for TradeStation

Advertisements
ads banner

More from Finance Strategy System

- Advertisement -

Related Articles