Learn How To Easily Read Files With EasyLanguage

Have you ever wanted to use an external data within your TradeStation strategy, indicator or paint bar? There is no easy way to have standard EasyLanguage read data from a file. With object oriented EasyLanguage (OOEL) you can do it, but not everyone is comfortable with OOEL.

Well, now you can easily read data from a file!

Just this week a new TradeStation tool has become available which allows you to easily read and write data from EasyLanguage. It's called File Input-Output Library (FIO Library) and it's a great way for you to import all types of data into TradeStation and use it to make trading decisions!

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.

Conclusion

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).

FIO Library

Learn More. Get Your Own Copy

About the Author Murray Ruggiero

Murray Ruggiero is a consultant for TTM. He is one of the world’s foremost experts on the use of intermarket and trend analysis in locating and confirming developing price moves in the markets. Murray with almost 30 years of experience as a trading systems designer, digs into the depths of niche and sub-markets, developing very specialized programs to take advantage of opportunities that often escape the public eye, and even experienced high level money managers.

>