2

EasyLanguage Program Structure

STRUCTURED PROGRAMMING

Structured programming was introduced in the early 1970s. This concept stressed breaking a program down into manageable modules and then connecting those modules together into a coherent and logical flow of instructions. We know that the readers of this book will probably not become professional programmers, but structured programming is necessary for the accurate transfer of ideas into action. Any time you add structure to anything, you are always better off. EasyLanguage was developed as an easy-to-learn language for traders. It was not intended to produce professional programmers, but instead to get traders to write some simple programs. Through our years of programming with EasyLanguage, we have discovered that most analysis techniques programs can be broken down into three different modules: a program header, a calculation module, and an order placement module. This modularization is not necessary to program analysis techniques. In fact, since EasyLanguage has so many shortcuts, many programmers prefer quick and dirty “spaghetti” code (code that is as disorganized as a plate of spaghetti). This quick programming is fine for simple brainstorming, but when your analysis techniques become complicated, structured programming will save you time in the long run. It is also necessary for debugging purposes and you will be doing some debugging.

PROGRAM HEADER

The header of an EasyLanguage program is the portal for communication ...

Get Building Winning Trading Systems with TradeStation™ now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.