Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
TradeStation EasyLanguage for Algorithmic Trading

You're reading from   TradeStation EasyLanguage for Algorithmic Trading Discover real-world institutional applications of Equities, Futures, and Forex markets

Arrow left icon
Product type Paperback
Published in Sep 2024
Publisher Packt
ISBN-13 9781835881200
Length 282 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Domenico D'Errico Domenico D'Errico
Author Profile Icon Domenico D'Errico
Domenico D'Errico
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Chapter 1: Introduction to Algorithmic Trading and the TradeStation Platform FREE CHAPTER 2. Chapter 2: Getting Hands-On with EasyLanguage 3. Chapter 3: Writing a Trend Strategy 4. Chapter 4: Strategy Backtesting and Validation 5. Chapter 5: Reversal Strategies 6. Chapter 6: Trend Pullback Strategies 7. Chapter 7: Risk Management 8. Chapter 8: Futures and Forex Algorithmic Trading 9. Chapter 9: The Trading Operational Plan 10. Chapter 10: EasyLanguage in AI – Bridging Traditional Trading and Advanced Analytics 11. Chapter 11: EasyLanguage for Machine Learning 12. Index

Introducing the TradeStation platform

TradeStation is a financial brokerage and trading platform that allows users to trade various financial instruments. Key features of TradeStation typically include advanced charting and technical analysis tools, customizable trading strategies, and a variety of order types. It is known for its focus on providing tools for technical analysis and algorithmic trading.

Let’s get an overview of TradeStation by going through the following:

  • The TradeStation story
  • The download and installation procedure
  • TradeStation apps
  • The working environment: Workspaces and desktops

The TradeStation story

When I started using TradeStation and EasyLanguage many years ago, I had the impression that the platform and the language editor understood what I, as a trader, was looking for. It was a bit like using a co-pilot, but at that time, AI was just a movie.

Now, there are many software options available for algorithmic trading, but at an early stage as a programmer, TradeStation’s EasyLanguage (or PowerLanguage from MultiCharts, which is 90% supported) is the best choice because it doesn’t require previous programming experience and has a short learning curve.

MultiCharts PowerLanguage

MultiCharts (www.multicharts.com) is a trading platform very similar to TradeStation. The main differences are in the broker integration both for trading and data feeding, as MultiCharts supports integration with various brokers, and TradeStation is both a trading platform and a brokerage. All the EasyLanguage scripts provided in this book are 100% supported by MultiCharts.

TradeStation has quite a compelling story in the world of trading and financial technology. Originally founded in 1982 by William and Rafael Cruz, TradeStation started as Omega Research, Inc., focusing on developing tools for traders. In 1991, they launched the TradeStation platform, which quickly gained attention for its advanced charting, technical analysis tools, and strategy backtesting capabilities.

As the years progressed, TradeStation evolved into a comprehensive trading platform offering not just analysis tools but also order execution capabilities for equities, options, futures, and forex trading. It became known for its robustness in catering to active and professional traders, offering customizable features and algorithmic trading capabilities.

In 2011, TradeStation was acquired by Monex Group, a global financial services company. This acquisition further expanded TradeStation’s reach and resources, allowing for enhancements in technology and service offerings.

TradeStation has continued to innovate, adapting to changing market needs and technological advancements. It has remained a prominent player in the trading platform arena, often favored by traders seeking powerful analytical tools and a comprehensive trading environment.

The platform’s journey has been characterized by a commitment to providing traders with cutting-edge technology, a user-friendly interface, and a suite of tools to support their trading strategies across various financial markets.

Now that you know the story of TradeStation, let’s download and install it on your system.

Download and installation procedure

First of all, you need to open a TradeStation account at http://www.tradestation.com/ and follow the instructions provided on the main web page.

Once you have an account, you can log in to the website and download the desktop platform by going to Download Software | Download Platform. Then, follow the straightforward installation instructions.

There are some prerequisites for it, which are listed next. Please check the minimum requirements before installation:

Processor

Dual-core Intel® or AMD® processor at 1.5 GHz or faster

Memory (RAM)

8 GB

Hard Drive

5,400 RPM drive

400 MB free space or more

Video Cards

32-bit graphics support

256 MB for a single monitor

Screen Resolution

1280×1024 pixels or higher

Operating Systems

Windows® 10 64-bit

Windows® 10 32-bit

Internet Browser

Microsoft Edge browser

Internet Connection

Broadband connection

2 Mbps or better (download)

Table 1.1 - Technical minimum requirements

In case you need any kind of technical help related to the platform, you can find a very active community at https://community.tradestation.com/discussions/.

Once the installation is complete, double-click on the TradeStation icon that you will find on your desktop. The platform will look like Figure 1.2. Please note that every time we mention the main menu, we are referring to the menu you see in Figure 1.2:

Figure 1.2 - Main menu

Figure 1.2 - Main menu

We are going now to introduce the main TradeStation apps.

Introducing TradeStation apps

The latest release of the TradeStation platform (version 10, update 72) is made of 20 apps. by clicking on File | New Application, we can see the list of available applications (Figure 1.3):

Figure 1.3 - TradeStation apps

Figure 1.3 - TradeStation apps

In Figure 1.3, you see the 20 applications available listed in alphabetical order. For the algorithmic training purpose of this book, we are mainly going to deal with four of them:

  • Chart Analysis: We can use this to visualize price charts and indicators or strategies applied to them
  • RadarScreen: We can use this to monitor up to 1,000 markets in real time
  • Scanner: We can use this to scan the entire symbols universe for specific trading opportunities based on predefined criteria
  • EasyLanguage: We can use this to manage the TradeStation Development Environment page (or EasyLanguage editor)

Chart analysis

A chart analysis is a chart that visually represents the historical price and volume data of a security over a specific period. It is the basic brick where you can add indicators or strategies; such functionalities will be illustrated starting in Chapter 2.

To create a chart analysis from the main menu, go to File | New Application | Chart Analysis. In Figure 1.4, you see a chart for SPY, which is the financial asset representing the main 500 US companies:

Figure 1.4 - Chart analysis for SPY ETF

Figure 1.4 - Chart analysis for SPY ETF

As you can see in Figure 1.4, the chart settings can be modified by the menu available on top of the chart, where you can manage the following:

  • Timeframe
  • Drawing
  • Studies
  • Strategies
  • Data
  • Style
  • Settings

To choose the chart’s timeframe, click on Timeframe, and then select your preferred one, as shown in Figure 1.5. For example, in Figure 1.4, we used the Daily timeframe option:

Figure 1.5 - Chart timeframe

Figure 1.5 - Chart timeframe

The Drawing menu allows you to incorporate drawings into the chart. However, this feature is seldom utilized in algorithmic trading.

To apply a study, from the chart menu, go to Studies | Add Study. A list similar to Figure 1.6 will show you the studies available: all your custom studies will be shown in this list.

Figure 1.6 - Chart studies

Figure 1.6 - Chart studies

For example, in Figure 1.7, we applied a MACD indicator on the Daily chart of SPY:

Figure 1.7 - MACD indicator

Figure 1.7 - MACD indicator

To apply a strategy, from the chart menu, go to Studies | Add Strategy. A list similar to Figure 1.8 will show you the strategies available: all your custom strategies will be shown in this list.

Figure 1.8 - Chart strategies

Figure 1.8 - Chart strategies

For example, in Figure 1.9, we added a MACD strategy on the same Daily chart of SPY:

Figure 1.9 - MACD strategy

Figure 1.9 - MACD strategy

To manage the historical data or change the symbol properties, you can click on Data and navigate the list shown in Figure 1.10:

Figure 1.10 - Chart data

Figure 1.10 - Chart data

To manage the chart’s style, you can click on Style and navigate the list shown in Figure 1.11:

Figure 1.11 - Chart styles

Figure 1.11 - Chart styles

If you click on Settings, you can find additional resources to customize your chart (Figure 1.12):

Figure 1.12 - Chart settings

Figure 1.12 - Chart settings

We now understand how to manage TradeStation charts. Being familiar with them is crucial for algorithm programming because the charts are generated from the same datasets that will be used for creating both indicators and strategies. As you will see in the coming chapters, charts will be the primary tool you use to determine whether the strategies you have written are correct.

RadarScreen

RadarScreen is a real-time scanning and ranking tool that allows you to apply technical and fundamental indicators to a list of symbols in a tabular format. Each symbol row in RadarScreen is similar to a chart in that you can access historical data at any bar interval for any symbol as needed for your indicator calculations. There are hundreds of indicator columns covering all aspects of market analysis that can be inserted into RadarScreen. You can build symbol watch lists by inserting pre-built symbol lists or you can create your own custom lists. RadarScreen can dynamically sort and rank groups of symbols based on alert criteria, price information, or indicator calculations, and you can customize any calculation or alert for the way you trade.

To create a RadarScreen page, go to File |New Application | RadarScreen or press Ctrl + Alt + Q. The RadarScreen page will appear as in Figure 1.13:

Figure 1.13 - RadarScreen

Figure 1.13 - RadarScreen

There are two ways to insert symbols into a RadarScreen page.

The first way is to insert symbols manually by just typing the ticker into any cell in the Symbol column (Figure 1.14):

Figure 1.14 - RadarScreen—adding a symbol manually

Figure 1.14 - RadarScreen—adding a symbol manually

Please note that on RadarScreen pages, you can manually edit just the symbol names.

The second way is to go to Data | Add Symbol List and choose your preferred symbol list among the many TradeStation lists available (Figure 1.15):

Figure 1.15 - RadarScreen—TradeStation symbol lists

Figure 1.15 - RadarScreen—TradeStation symbol lists

For example, in Figure 1.16, we chose the Dow Jones 30 list:

Figure 1.16 - RadarScreen Dow Jones 30

Figure 1.16 - RadarScreen Dow Jones 30

To choose the RadarScreen timeframe, you need to click on Timeframe and select your preferred one. The list is the same as we saw for Chart Analysis.

To add indicators, from the RadarScreen menu, go to Studies and then select your preferred one from the list of available indicators.

From the Settings menu, you can customize the layout of the RadarScreen tool, such as managing the page settings, captions, and templates (Figure 1.17):

Figure 1.17 - RadarScreen settings

Figure 1.17 - RadarScreen settings

From Settings | Page, you can manage settings such as Color, Font, and Grid (Figure 1.18):

Figure 1.18 - Settings | Page

Figure 1.18 - Settings | Page

Using RadarScreen is similar to having the big picture of multiple charts showing just the last real-time reading both for the price and for any indicator applied. Please remember that RadarScreen has a limitation of 1,000 rows; if you need to manage longer lists, you may need to use Scanner.

Scanner

The Scanner app is a tool to scan lists with more than 1,000 symbols. It is not in real time, and it is very useful for equity traders interested in daily/weekly/monthly market analysis.

You can open an empty Scanner page from the main menu by going to File | New Application | Scanner. It will appear as shown in Figure 1.19:

Figure 1.19 - Empty Scanner page

Figure 1.19 - Empty Scanner page

Scanner pages are a must when you deal with thousands of stock symbols. We will see how to set and use Scanner in Chapter 3.

EasyLanguage

From the main menu, go to File | New Application | EasyLanguage to open the TradeStation Development Environment page (or EasyLanguage editor). It will appear as an empty space with a menu, as shown in Figure 1.20. Every time we talk about the EasyLanguage menu, we will be referring to this:

Figure 1.20 - TradeStation Development Environment (or EasyLanguage editor)

Figure 1.20 - TradeStation Development Environment (or EasyLanguage editor)

Try to create a new indicator from the EasyLanguage editor menu. Go to File | New | Indicator, give it the name myindicator, and then click OK:

Figure 1.21 - The myindicator indicator

Figure 1.21 - The myindicator indicator

In Figure 1.21, you can see what the editor will look like. For the purpose of this book, you are mainly going to use the text editor section, in which you will write 100% of your code, and the output bar, where compiling errors will appear.

Workspaces and desktops

TradeStation allows the creation of customized working environments by using the following:

  • Workspaces
  • Desktops

Workspaces

A workspace is a customizable environment where users can arrange and organize different apps such as Chart Analysis, RadarScreen, and other analysis tools. The workspace allows traders to have a tailored setup that suits their trading preferences and strategies.

In Figure 1.22, you can see a workspace populated with multiple charts:

Figure 1.22 - Workspace with multiple charts

Figure 1.22 - Workspace with multiple charts

In Figure 1.23, you can see a workspace containing one RadarScreen linked to one chart:

Figure 1.23 - Workspace with RadarScreen and chart linked

Figure 1.23 - Workspace with RadarScreen and chart linked

Remember that to link a chart to a RadarScreen, you need to give the Symbol Link button the same color, as shown in Figure 1.24:

Figure 1.24 - Symbol Link

Figure 1.24 - Symbol Link

Workspaces are a very useful tool to customize your working environment according to your needs. Remember that your needs may change during the week and/or during the day; for example, you might use a workspace with Scanner while markets are closed and a workspace with RadarScreen and Chart Analysis during the trading sessions. Workspaces can be managed by going to File | Workspace.

Multiple workspaces can be collected into one desktop.

Desktops

Desktops are very useful if you manage multiple monitors: for example, if you have two monitors, you could open one desktop dedicated to equities on monitor 1 and a second desktop dedicated to forex on monitor 2.

Figure 1.25 - Desktops

Figure 1.25 - Desktops

Desktops can be managed by going to File | Desktops.

In conclusion, TradeStation provides a comprehensive suite of tools and features for traders and investors, facilitating technical analysis and decision-making. The platform’s tools, such as RadarScreen and Scanner, empower users to monitor and filter financial instruments based on specific criteria, while Chart Analysis allows for a visual representation of historical price movements. Traders can customize their analyses through various chart types, time frames, and technical indicators.

You have been reading a chapter from
TradeStation EasyLanguage for Algorithmic Trading
Published in: Sep 2024
Publisher: Packt
ISBN-13: 9781835881200
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image