CHAPTER 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. The modular concept was so important that the creator of the Pascal programming language, Niklaus Wirth, created a new programming language built primarily on this concept and named it Modula-2. 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 ...

Get Building Winning Trading Systems with TradeStation®, + Website, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.