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

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

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.

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.

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 are much more powerful to analyze data.

If you are searching price pattern 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);

Now we just have to create an indicator to grab all the data from the TradeStation. This is the part of 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.

// 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 in extracting only prices.

You can extract any type of data. For example the Volume Delta or any type of aggregate data. You can insert any type of 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 be able to 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.

Now you can load the data in excel:

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

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

Excel Guide

## More from Finance Strategy System

EasyLanguage & PowerLanguage Tutorial – The Inputs

HOW TO CREATE A FUNCTION IN TRADESTATION