Overcoming the Blank Screen

By: Joe Duffy

The following is an excerpt from Joe Duffy’s Ultimate Trading Robot

“The single most important book on evidence-based trading since Wilder’s New Concepts”

How to Get Started with Ideas that Work

You have opened up your new technical analysis software and you want to design a rule based strategy or system to propel you to success in your trading and investing. Where do you be­gin? Not only do you need an idea to start building a rule based strategy, but also you have to learn your analysis software’s pro­gramming language. Fortunately, neither need be as daunting as it may seem at first.

There is a plethora of information on technical analysis tools, and very little evidence based information on how to use them to develop profitable trading strategies. Strategy development is a serial process. The more you do it, the more you watch your strategies perform on fresh market data, the more feedback you receive, the more ideas you will think of to improve your strategies. By continuing to test new wrinkles and by examining the results of your testing, you will move from sitting down and not knowing what to test, to not having enough time to test all the ideas you can think of!

The two most important aspects in building a successful rule based trading strategy are “screen time” and “perseverance.” The best and most successful trading strategies I have ever seen are based on simple concepts with the sophistication in the de­tails.

This course will point you down many varied paths with regard to strategy design components. The more paths you go down, the more sophisticated your thinking will become. Some of these paths will be ones you likely would not have found on your own without a lot of hands-on experience. Once you gain the experience, more and more ideas and new paths in trading strategy development will begin to open up for you.
 
Setting Up a Simple System

There are many technical analysis and strategy testing software alternatives on the market. Most all have an intuitive program­ming language that allows one to write simple English sentences to empirically test any trading idea on historical data. Since many of the programming languages are not too much different between different software vendors, it should be a relatively simple task to translate the generic code to your own software’s program­ming language. Any issues can be resolved by the “Help” and then “Search” avenues that every software package includes.

The learning curve is not difficult. It is essentially writing what you want to do using plain English phrases that your software recognizes. To illustrate, below are a few sample statements written for a generic software package.

First go to the System or Toolbox section of your analysis soft­ware to start to build a strategy. There are 4 components that you will need to satisfy in some form for the software to accept the input to test your strategy idea. Each of CONDITION, ACTION, ORDER TYPE, and EXECUTION are defined as discussed be­low. There are common elements in any code you write using any analysis software.

The following are examples of statements coded in our generic programming language:

CONDITION: IF close > open.1
This states the condition that if the close of the bar just com­pleted is greater then the open of the bar before the bar just com­pleted then proceed…. Note that open.1 means the open of the bar before the last bar. Open.2 would mean the open of two bars before the last bar.

The following chart illustrates this.

Chart I

ACTION: Buy Long
In this box you will choose the action to take if the condition above is true. The choices are Buy Long, Sell Short, Exit Long and Exit Short. These are obviously the only four actions that are possible.

ORDER TYPE: Stop
In this space you can choose any order entry type from Stop, Stop Limit, Market, Market-on-Close, Stop-on-Close, Stop-Limit-on-Close.

EXECUTION: next bar open + AvgTrueRange(10)
In this space you indicate how the order is to be executed. In this case we are using a stop order so we need to indicate what must happen for the stop to be triggered. This is a simple buy stop entry. We will enter long at the next bar open price plus AvgTrueRange (10). The Avg True Range(10) is the average of the last 10 bar ranges. That amount is added to the open of the next bar for the stop entry point. The stop will only be executed if the price reaches this point.

Thus, we have constructed a simple buy entry.