This post is for those interested in exploring "How Effective Are Rectangles?", an article by Markos Katsanos in the June 2007 issue of Stocks and Commodities magazine.
You can import the necessary Setups by right-clicking on the following file and selecting "Save Target As...":
After the above file has been saved on your computer, use the File > Import Database menu to locate and import it. You will then have access to these items:
A Strategy named:
Rectangle Breakout Strategy
4 Custom Formulas named:
A Trading Rule named:
Rectangle Breakout Long
And a new Chart named:
There's an old Steve Martin routine where he says "YOU... can make a million dollars and NEVER pay taxes." He then quietly mumbles "first, get a million dollars" before moving on to the part about never paying taxes. This month's article on Rectangles is somewhat similar by claiming that you can improve your exits from rectangles; but first, he quietly says, find a rectangle formation. And then he moves on to discuss how one can best exit from that rectangle formation entry. (Side note: I e-mailed the author requesting the details of his Rectangle Formation formula, but he did not respond).
To implement this as a full-blown strategy that can be back-tested, we first needed to have a Custom Formula that would identify rectangle formations to begin with. Mr. Katsanos did at least provide the following criteria: "a sideways price action bounded by two horizontal or nearly horizontal support & resistance lines." Based on this description, I was able to set up a parameter-based Custom Formula that identifies such support & resistance lines, while still requiring a range of up and down movement in the middle as well as sideways action during that entire period.
The article primarily focuses on identifying a price target once a rectangle breakout has occurred. But price targets can also be somewhat vague in their implementation as a full trading system. What do you do if a price target isn't reached? Do you still exit at the price target even if the other indicators show there is still plenty of upward potential? These questions also were not discussed.
To implement this as a Strategy, I set it up to enter a long position when the price broke above the top line of the rectangle. The position would then exit based on the author's calculated price target. In case the price target was not reached, I also placed a stop at the bottom line of the rectangle.
It's first important to note that rectangle formations are relatively rare. As the author said, he found only 100 in the entire 2004-2005 period. Because of this, and because I wanted to test a range of parameter sets, I ran my analysis on 5 years of data for All Securities
. What surprised me was just how well this indicator performed on its own. Nearly all parameter sets tested proved to be profitable at the portfolio-sizes of 5 and 10. As well, nearly all parameter sets had a percentage profitable better than 50%, with many being 75% or higher. I did not examine standard deviations or other performance values, and the holding periods were rather long (100 to 200 days). But this brief analysis at least showed that the rectangle breakout indicator has some potential, particularly if it is used alongside other indicators.
Users that wish to investigate this indicator further should prepare themselves for a slow analysis, since it will likely need to be run against "All Securities" to obtain a worthwhile number of trades. For this reason, the Primary Trading Rule with this plug-in is not turned on for processing by default. If you wish to include this indicator in your automated searches, enter the Setups > AutoSearch Setups and update the setup of your choice (Generic AutoSearch
for most OneClick Searches). On the Primary tab, locate "Rectangle Breakout Long" and double-click the associated Random
box. Or, if you wish your automated search to use this indicator exclusively as the starting point, double-click the associated Always
I don't think it was the author's intention that we'd be focusing on the entry side of the rectangle breakout rather than the predicted exit that he discussed, but it's the entry that seems to be the real benefit for system traders.
Rectangle Formation Chart