"Using EasyLanguage 9.x"

by Murray Ruggiero, Arthur Putt & William Brower. Edited by Sunny Harris.

QUICK LINKS: Table of Contents | Introduction | Foreword | Sample Pages

The chart on the cover of this book is a snippet of my SunnyBands indicator. Notice how price goes right to the band and turns around. It's a GREAT way to sell at highs and buy at lows. Click Here to jump to the Order Form and more information on this indicator.

book

 

CD-Rom Table of Contents

Click Here to purchase the Book. Click Here to purchase the CD. Click Here for Both.

This is ALL the code in the book.

  • TrailingStop1
  • ClearLog
  • Congestion.1
  • EL2
    • OB/OS
    • 2% Reversal
    • 9904 Array Test
    • Array Setup
    • Avg Range Alt
    • Avg Range
    • Calling Daily 1.00
    • Calling Daily 1.10
    • Calling Daily 1.11
    • Increm rounding
    • Legends Test
    • MA Cross
    • Moving Avg
    • Open-Close Comm
    • Open-Close
    • RSI - %R Daily
    • RSI -%R Daily 1.10
    • RSI - %R
    • Selection Sort
    • String Test
      • 1
      • 2
      • 3
    • Support/Resistance
    • Test Orders
    • Test Orders 2
    • Test TIme
    • Trend Multi
    • Trend Daily
    • Trend Follow
    • Trendline
    • Holidays
    • Pass Array Test
    • Putt$TrailStop
    • Putt Congestion
    • Putt Consecutive Closes
    • PuttGetSetLongShowMe
    • PuttKeyReversalShowMe

Introduction

TradeStation is a powerful tool for collecting equity price data, charting price data, and analyzing price data in order to enhance the probability of a profitable stock or commodity trade. Other collecting and charting applications exist; however. From the first release of TradeStation, traders have had the ability to translate their trading methods into viable studies and systems that are executed by a personal computer. By using the the TradeStation Development Environment  (TDE ), a trader is able to develop studies, systems, and user functions specific to their own individual trading methods. EasyLanguage provides the means to back-test those custom ideas on historical data and generate realtime trading signals going forward.

EasyLanguage  is the programming engine used to develop a study or system. EasyLanguage is unique in that it is a programming language similar to Pascal but was designed specifically for traders. It is relatively easy to use because it uses English-like commands but is still quite powerful. This differentiates it from other charting applications for the personal computer.

The word “programming” may be intimidating to many. However, by following the steps and doing the examples in each chapter, you will quickly see that much more is to be gained from TradeStation other than just charting data. Those that have tried to program a study or system in EasyLanguage quickly found out that the words may be common but the rules for using the words are foreign. By concentrating on a few basic rules, many fears and complications can be avoided.

For beginner and experienced programmers alike, expect to spend many hours writing and re-writing code until you get the correct results. By correct results, meaning the study or your system does exactly as told by the program whether the method is profitable or not profitable. Numerous hours may be spent writing code for a study or system only to find out the results are not what were expected. Will those hours be a waste of time?  No, you will have gained additional experience in programming and may well use some of that code later in some other study or system. Besides, finding out a trading strategy is unprofitable by back-testing is a lot cheaper than finding out by trading it.

The purpose of this book is to introduce you to the EasyLanguage way of programming and provide you with sufficient knowledge in the use of EasyLanguage to become confident to program your own trading methods and to utilize TradeStation to do the back-testing, optimizing and trading signal generation. It is not intended to replace the EasyLanguage Manual, which is supplied with TradeStation, containing descriptions of the built-in studies, functions and systems along with examples of their use. It is a good idea to be aware of that helpful manual and that you become familiar with the documentation that is supplied with TradeStation.

This book has been updated to include the new features of TradeStation 9. The chapters have been rewritten and modified to include comments about the new features where appropriate.

NOTE: There is a CD-Rom to accompany this book (for a small extra fee). The CD contains all the code found in this book. It's more than worth the price.

 

Foreword

In our community of traders, during the late 1990’s there was one book which was the best way for people who have never programmed to learn EasyLanguage and be able to put their ideas in code. In our community it was known as “The Putt Book”. This book was last updated in 1998 for TradeStation 2000i. Murray Ruggiero bought the rights to this book in 1996 and made it one it one of the best-selling books of its time.

Murray, like the Putt book, has been quiet in the TradeStation community for over a decade, but now both of them are back. Murray has been busy with research and other projects, but he is now back as an EasyLanguage developer. If you don’t remember Murray, he was the premier add-on developer during the second half of the 1990’s and was even featured on the cover of Omega Magazine which was published during the late 1990’s. Now Murray has personally updated “The Putt Book” for TradeStation and is calling it “Using EasyLanguage 9.xx.”

This one-of-a-kind book gives novice EasyLanguage programmers a chance at getting great. The original Putt Book was the springboard for most of us who now speak EasyLanguage proficiently. I even cite “The Putt Book” in my “TradeStation Made Easy!” book, drawing from its many examples.
As with any software manual, Chapter One of “Using EasyLanguage” contains the setup rules for EasyLanguage. Ruggiero explains comments, braces and parentheses, and the mandatory basics. It is just ten pages that we all have to understand before proceeding.
Starting with Chapter Two, the author begins tackling tough concepts alongside the easy. For instance, I don’t know of any other books for beginners that introduce the mathematical concept of Modulo Arithmetic. Why, you might ask, do we need to know that? And the answer is: because it is a very powerful tool that is the answer to smoothing and rounding problems, and it can readily be used to avoid whipsaw issues. And I applaud this book for giving the beginner a real tool, and not just the easy basics.

That said, I must interject a caveat. Murray, and his counterpart Putt, are way smarter than we regular folks. As a consequence, they don’t realize just how slow we can be and how much information we need before we understand what they are meaning to tell us. Sometimes the text in this book is lacking in full explanations that we all can understand. To that I must say, “Give it time.” Read and re-read if you have to, in order to grasp the concepts. It is really, really worth it. There is a treasure trove of easy and complex concepts in “The Putt Book”, from which we all draw. In this new work by Murray Ruggiero et al, “Using EasyLanguage 9.x”, the treasure is exponential.

I thought I knew a lot of EasyLanguage, having written “the book” (“TradeStation Made Easy!”) and having studied and practiced EasyLanguage for many, many years. But, I find with “Using EasyLanguage 9.xx” I am learning more than I knew I was missing. For instance, in Chapter 7 I am learning new text commands and more about ExpertCommentary manipulation. In Chapter 9 I was pleased to get more instruction on including systems within each other and on using the Global Variable DLL.

Every chapter has something in it that is new and fresh. Every chapter is a “must read” for all traders. Yet, every chapter has something in it that you will have to think about a second time to understand. The material is intended for beginners, but is complex enough to excite veterans.
In short, this small book has more in it than most big books. “Using EasyLanguage 9.xx” is chock full of information all traders (whether novice or seasoned) need to know, or to brush up on. Again, it is brilliant. Thanks, Murray, for updating and revising this “can’t-live-without-it” book.


sign
Sunny J. Harris

Author of “TradeStation Made Easy!” “Trading 101—How to Trade Like a Pro,” “Trading 102—Getting Down to Business,” “Electronic Day Trading 101,” and “Getting Started in Trading.”

Editor of www.moneymentor.com and “Sunny Side of the Street”

 

Table of Contents (of the book)

USING EASYLANGUAGE 9.X

Disclaimer
Introduction
Foreword

Table Of Contents

1..... THE BASICS (RULES)
Definitions
Reserved Words.
Data Types
Inputs And Variables
Mathematical Symbols
Order Of Precedence
Easylanguage Command Structure
Program Structure
Flow Chart The Study/System Methods
Comments
Types Of Orders.
Setting Up A Price Chart
Using The Tradestation Development Environment (Tde)
Maxbarsback

2..... THE INDICATOR STUDY
Moving Average Indicator
Input And Variable Definition
If .... Then Begin Statement
Plot Statement..
Displaced Plotting
Overbought/Oversold Indicator
Open-Close Trend Indicator
Support And Resistance Areas
Rounding To Incremental Values

3..... THE PAINTBAR AND SHOWME STUDIES
Get Set Long Paintbar
Get Set Short Paintbar
Short-Term Trend Paintbars
Paintbar With Different Colors
Volatility Paintbar
Key Reversal Showme
Consecutive Closes Showme

4..... A TRADING SYSTEM (THE ENTRY AND THE EXIT)
Trend Following Trading System
Trade Manager
Performance Summary And Trade-By-Trade Reports
Optimization Of Inputs
Exit Signals
Stop-Loss And Profit Objective Exit Routines
Back-Testing
Trend Daily Trading System
Other Key Categories For Optimization
2% Reversal System

5..... ANALYSIS OF THE TRADING SYSTEM
Prevent Trades Late In The Trading Day
Exit Trade If No Market Movement
Prevent Re-Entry On Same Bar As Exit
Prevent Lunch-Time Trading
Analysis Of Daily Trading System
Curve-Fitting

6..... SIGNAL FLAGS AND PRINT STATEMENTS
Controlling Flags
Signal Active Beyond One Bar
Price Value Variables
Daily Trading System
Rsi And Percent R
Rsi-%R Indicator
Rsi-%R Trading System
Print Statement..
Fileappend Statement

7..... STRING VARIABLES AND COMMENTARIES
String Manipulation
Commentaries
Commentary Applied To The Open - Close Indicator
Conditional Commentaries
Enabling Alerts.

8..... USER FUNCTIONS
Congestion
Trailing Stop
Holidays
Overbought/Oversold
Time Conversion To Am & Pm
Clear The Print Log

9..... INCLUDESYSTEM AND GLOBAL VARIABLES
Includesystem
Global Variables And The New Global Dictionary

10.... MULTIPLE POSITIONS
Multiple Contracts
Short-Term Profit Objective
Position Basis Function

11.... MULTI-DATA CHARTING AND SYSTEMS
Intra-Day Multi-Data System
Daily Multi-Data System

12.... ARRAYS
Single-Dimensional:
Multi-Dimensional:
Defining, Initializing, And Assigning Arrays
Single Dimensional Arrays
Multi-Dimensional Arrays
Computer’s Memory
For And While Loop Command
Saving Specific Values
Selection Sort..
Trendlines

13.... TEXT FUNCTIONS
Text Message Labels
Text Message Orientation
Orders To The Printlog
Orders Displayed On The Chart
Text Message Labels As Indicator Legends

14.... DRAWING OBJECTS
Swing Points
Short-Term Trendlines
Sorting Arrays With A “Bubble Sort”

15.... REVERSE-PROGRAMMING
Trendline Alerts
16.... OTHER FUNCTIONS, TIPS, AND TECHNIQUES
Absvalue Function
Avgprice Function
Iff Function
Elexcel.Dll - Version 1.3 - Download Using These Links:
Sounds
Other

17.... FEATURES OF TS 9.0+
EasyLanguage Editor Overview
Other Features.
Built-In Stops.
Passing Arrays To And From Functions
Array Manipulation
Fast Calculation Functions
Swinghigh And Swinglow Functions
Activity Bars
Probability Maps
Smart Styling

INDEX

 

SAMPLE PAGES
uepage Click Here to Download a pdf file of a few more pages.