Reading Data Into TradeStation With EasyLanguage
In this article I will show you what you can do with FIO Library. Behind the scenes data from a CSV file is read, packed into a vector and then unpacked into a 2-D array. Do not worry if you do not know what a vector is. If you have some knowledge of arrays, you will feel amazingly comfortable.
Take a look at this equity curve.
This strategy solely uses data from an external file to make trading decisions. Here is the sample data that was read into the strategy. Before you read it, promise you will not laugh.
This is just the start of the data. There are over 3,000 lines. With the use of the FIO Library, we were able to feed this data into a TradeStation strategy and develop a simple trading system. This example is only for illustrative purposes, but it does show how powerful the library is and also how easy it is to incorporate into your own trading.
This strategy buys when there is a Full Moon with a Position > 0.5 and then sells on the first occurrence of a New Moon. A $2,500 stop is used and only one trade per phase is allowed – which turns out to be about once a month.
Below is a quick snapshot of the performance.
Is there something to buying on a full moon or is this just a consequence of a bull market – probably the latter but you get the gist.
This strategy is reading data from a Moon.CSV file. The 3000+ lines of data is read and stored in a vector. The vector is then converted to a 2D array – simply known as table. Once the table is in memory it is quite simple to span the table and align the dates of the TradeStation chart with the data and extract the necessary information.
The KEY components of the code are importing the OOEL library – which everybody has if they have TradeStation.
With this new set of TradeStation functions you can easily read data from a file. The FIO Library can do so much more as well. But that will be left for another article.
Best of all you can pick up a copy of FIO Library starting this week.
In celebration of the launch of this new TradeStation tool, you can get a copy at a discount for this week only (ending Monday, October 26th).
Learn More. Get Your Own Copy