November 2005 Letters To The Editor
or return to November 2005 Contents The editors of S&C invite readers to submit their opinions and information on subjects relating to technical analysis and this magazine. This column is our means of communication with our readers. Is there something you would like to know more (or less) about? Tell us about it. Without a source of new ideas and subjects coming from our readers, this magazine would not exist.
Address your correspondence to: Editor, STOCKS & COMMODITIES, 4757 California Ave. SW, Seattle, WA 98116-4499, or E-mail to editor@traders.com. All letters become the property of Technical Analysis, Inc. Letter-writers must include their full name and address for verification. Letters may be edited for length or clarity. The opinions expressed in this column do not necessarily represent those of the magazine. -Editor
TRUE STRENGTH INDEX
Editor,
As a veteran reader of S&C, I have found the recent dialogue on William Blau's TSI (true strength index) very interesting. I consider Blau's work on double smoothing as remarkably insightful. William Blau and I were friends and I remember how proud he was of the development of the TSI and related techniques, which were simple but elegant. I would like to point out, however, that the implementation is not a secret. At the risk of seeming promotional, I published it in my 1995 book Trading Systems & Methods and have expanded that coverage in the recent fourth edition, along with Blau's other techniques. The implementation of TSI can be done in one line in TradeStation, but it's easier to read in three lines:
Perry Kaufman, via emailNum = smoothedaverage(smoothedaverage(close-close[1],smooth1),smooth2);Denom = smoothedaverage(smoothedaverage(absvalue(close-close[1]),smooth1),smooth2);TSI = 100*num/denom;Editor: Thank you for sharing this.
Readers may be interested to find the following articles by William Blau as well as one by Perry Kaufman at the S&C Online Store:
Blau, William [1991]. "Double Smoothed-Stochastics," Technical Analysis of STOCKS & COMMODITIES, Volume 9: January.
______ [1992]. "Trading With The True Strength Index," Technical Analysis of STOCKS & COMMODITIES, Volume 10: May.
______ [1991]. "Double-Smoothed Momenta," Technical Analysis of STOCKS & COMMODITIES, Volume 9: May.
______ [1991]. "True Stength Index," Technical Analysis of STOCKS & COMMODITIES, Volume 9: November.
Kaufman, Perry [1994]. "On Profit-Taking," Technical Analysis of STOCKS & COMMODITIES, Volume 12: April.
STOCKS ABOVE MOVING AVERAGES
Editor,
I'm looking for articles that may have been written in your magazine about the number of stocks above a moving average. I've tried searching for it on your website but there are too many results on moving averages in general. I would appreciate your help in this regard.
Robert Babak Rowshan, via emailEditor: See "Stocks Above Moving Averages" by Arthur A. Merrill, STOCKS & COMMODITIES, Volume 8 (May 1990). Here's the abstract:
The percentage of stocks above their moving averages has been tracked for a number of years by Investor's Intelligence, a weekly report that includes the number of New York Stock Exchange issues above their 10-week and 30-week moving averages.
PROGRAMMING FOR THE MARKETS
Editor,
Do you know of any books or training resources that teach computer programming for the markets? In particular, I am looking for any books or training in Visual Basic or C++ that place an emphasis on programming for the stock market, such as charting, formula writing, and backtesting. Perry J. Kaufman's book Trading Systems And Methods approaches this, but not to the extent I am seeking.
Tim Parker
via emailI am not aware of any such books; the only one I can think of is the one you already mentioned. I only know of manuals for specific programs such as Getting Started With TradeStation Easy Language. Perhaps it's a type of book that needs to be written.-Editor
USING ZIGZAG TO DETECT BREAKOUTS
Editor,
I read with interest the latest article by Markos Katsanos in the May 2005 S&C, "Detecting Breakouts From Flags & Pennants." In it, Katsanos uses the zigzag function to identify flags and pennants.
The choice of the zigzag indicator for identifying price formations is a common and a quite suitable one, since zigzag filters out noise and makes moves appear more obvious. However, as I have shown in my own past articles, the zigzag function cannot be used in trading systems "as is," because its own construction is based on hindsight, and hindsight cannot be part of any realistic trading mechanism. Failure to understand this could lead to false (revisable) real-time trading signals and unrealistic performance results during backtesting.
In system development, the zigzag trend (ZZT) indicator, which I introduced in my homonymous article in your magazine in the November 2003 issue, should always be used in place of zigzag. Unlike zigzag, ZZT does not produce revisable indications that can be used everywhere. In addition, ZZT does not use hindsight, and thus, the performance results achieved from its use are absolutely realistic. Unfortunately, in most cases, "realistic" also means "less profitable," but that is something every trader should learn to live with.
My second objection regards the use of MetaStock's lastvalue function in the system presented. This function looks forward and reads the last price available on the chart, so it uses hindsight, too. Unfortunately, due to restrictions set by the MetaStock Formula Language (MFL), its use is obligatory if one tries to simulate the effect of a variable controlling a function, something that Katsanos obviously needs to do. Nevertheless, the lastvalue approach is unacceptable in system design, although it might be used safely in an exploration like the one presented by Katsanos. The problem with this exploration is that it uses the zig function, too. Unlike lastvalue, zig should not be used in explorations either.
To conclude, Katsanos' exploration would become quite safe by simply replacing zig with ZZT. However, the same substitution cannot protect the specific system, which also suffers from the presence of lastvalue. So, unless Katsanos decides to use a constant instead of a variable to overcome the MFL restriction, or finds some other workaround, the system will give revisable signals and performance results. I guess that Katsanos meant this system more as a tool for analysis than for real trading, but I think that your readers should be forewarned.
Spyros Raftopoulos, via emailMarkos Katsanos replies:
I have tried substituting your ZZT indicator in place of the zig function, but this crippled the system and made it practically unusable because by the time the zigzag or reversal was confirmed, the system detected only potential flags that failed, as the successful ones had already broken out.
I have therefore decided to keep the original zig (C, 17, %) function in my explorations for the following reasons:
1. The system uses the zig function not for detecting flags but only for calculating the number of days from the flag pole. Other conditions such as the height of the pole and so on are used to detect potential flags.
2. It makes no difference for the system whether the zig reversal is confirmed or not; in fact it's better if it's not confirmed, since this is what we are hoping for -- that is, for the flag to continue its pre-zig course.
3. If a 17% reversal is confirmed, this will exclude 90% of the flags, since most flags usually decline less than that. I used a 17% zig because I wanted to ensure a steep-enough pole (on the left side of the zig reversal), but I did not want the same amount on the right side of the pole top. In fact, it is better that a 17% reversal should not be confirmed.
If it makes you feel better, you could use another way to assess the number of days from the pole top by using MetaStock's HHV function. If you or other readers are bothered by the zig function, then substitute the following lines of code in MetaStock:
ZZ: =Zig(C, 17, %);X:=BarsSince(ZZ<Ref(ZZ,-1) AND Ref(ZZ,-1)>Ref(ZZ,-2));:With X:=ref (HHV(C,20),-2)
Now concerning the lastvalue function: There is no doubt that a system employing an indicator that relies on hindsight is untestable using MetaStock's enhanced system test.Equis International (developer of MetaStock) technical support has assured me, however, that this will not cause any problem with an exploration, since lastvalue contains the last date of data, which is what the exploration is run on. There is also no problem if the exploration is run on a past date for testing purposes.
I included in my May 2005 article a system test only for demonstrating typical system signals and only after checking the validity of each signal by running explorations on the signal date. This should not be used to backtest the system because of the lastvalue problem. However, there is no problem in using the system with explorations. In fact, many readers have emailed me about the successful trades they've made since they've started using it.
SOFTWARE SEARCH
Editor,
Do you know of any software that logs trades, allows you to add comments, and produces statistics?
Brooks Rimes, via emailMost software packages and professional trading platforms contain all these features. If you perform a search in the Traders' Resource section of our website for these features, you'll come up with a few software products to check out.-Editor
PATTERN-RECOGNITION SOFTWARE
Editor,
I work in a research capacity and have traded as a bank proprietary trader and fund manager over the years.
I currently use the trade backtesting and optimization features in my software for system design. One area I want to begin concentrating on is pattern analysis.
I've used various traditional chart formations over the years (head & shoulders, double bottoms, and so on) on a discretionary basis and found them to be profitable given the proper money management parameters.
Could you give me some guidance on some good pattern-recognition software to use? I'm looking to analyze and scan a variety of products on both a daily and especially intraday (from 60-minute to even one-minute) basis for patterns.
I would use my own datafeed and would want the licensing feed in order to modify or add criteria.
Any advice would be greatly appreciated.
Craig Coatney, via emailVarious pattern-recognition software and plug-ins are on the market. Products we have reviewed in S&C that were designed to recognize patterns in charts includes one by Kasanjian Research and plug-ins for MetaStock.-Editor
FLAG AND PENNANT SYSTEM TEST
Editor,
I have read with interest Markos Katsanos' May 2005 article on flag and pennant exploration, and I have coded it and the System Test into version 7.2 of MetaStock. I have tested the Explorer on the South African market (about 450 stocks) for about eight dates, spaced about a fortnight apart, from April of this year. Our market is currently in a strong bull phase. This Explorer runs without fault but rejects all stocks as "Normal filter rejection."
When I go to save the system tester, it gives me the warning that "This is not a recognized name, constant, or operator" on the first line of code for the sell order of:
"D1:=Simulation.CurrentPositionAge; D2:=LASTVALUE(D1);"
I have copied the full code for both the Explorer and System Test as a Word file. Can you assist in identifying mistakes or problems?
Johann Basson
Pretoria, South AfricaMarkos Katsanos replies:
I had a look at your attached Word file with the code you sent me and found no errors except for the last line (V>50000), which was not in the original code that was published in my article. I also noticed your comment that 1,000 records are required. However, I see no reason to load 1,000 records (four years of data); I found that only 300 records are sufficient.
My usual number of flag candidates is three to four a day. In fact, last night's (8/23/2005) exploration on 1,500 US stocks produced the following hits:
CPST, CRUS, DAVE, NWD
I don't understand why you are not getting any hits. Maybe your data provider reports volume without the last two zeroes and the last condition excludes most stocks in the South African stock exchange, or maybe you do not have four years of historical data.Try removing the last line and running the exploration with 300 records loaded, and let me know if you get any hits.
Concerning the System Test, you are getting the error because the simulation functions are only available in MetaStock versions 8.0 or later.
Good luck!
FUND MANAGER SEARCH
Editor,
I am looking for a market timer with a good (30%+) verifiable record in both long and short trading in the futures or options market. Can you suggest anyone?
Sam E. Whittaker
Palm Beach, FLTechnical Writer David Penn replies:
Try checking Timertrac.com, which is a service that rates market timers. See my review of this service in the August 2005 issue of S&C. I don't recall how much they deal with futures (non-index futures, that is), but this might be a good place to start.
Best of luck!
ANOTHER RESOURCE FOR RELATIVE STRENGTH
Editor,
At the end of our September 2005 article, "Can Relative Strength Be Used In Portfolio Management?" we listed some resources for further reading. Here's another worthwhile resource to mention for readers interested in the application of relative strength to portfolio management:Peirce, Robert B. [1997]. "A Practical Application Of Alpha And Beta To Portfolio Construction," MTA Journal.
We didn't originally mention it with the article because the relative strength formulation is different than the two we tested, but it is still certainly worth a look.
Mike Moody, CMT, via email
ERRATA: FOREX FOCUS
Editor,
There seems to be an error in the Forex Focus article, "Are Fibonacci Levels Leading Indicator For Forex?" by Todd Gordon in the October issue of S&C. On page 14, the caption under Figure 2 states, "The move from A to B is subtracted from C to give a price target at D." I believe this should have read that the difference should be added to give the price target.
A very fine tutorial, in any event.
Ron Ponsini, via email
Back to November 2005 Contents