TRADERS' TIPS - May 1996 

This month's tips include formulas and programs for:
METASTOCK for Windows,
WAVE WI$E Market Spreadsheet,
SMARTRADER and
TECHNIFILTER PLUS,

METASTOCK FOR WINDOWS

To duplicate Dennis Meyers' gold and silver bond fund system ("The gold and silver bond fund system," elsewhere in this issue) in MetaStock, first you'll need to collect data on the Fidelity Government Bond Fund (FGOVX) and the Philadelphia Stock Exchange ( PHLX) gold and silver index (XAU). After collecting the data, open both charts in MetaStock for Windows. Drag the XAU and drop it on the heading of the FGOVX chart. Your resulting chart should look similar to the one in Figure 1. Select the XAU in the bond fund chart by clicking your mouse button until the little square handles appear on the XAU. Next, choose System Tester from the Tools menu and enter the following formulas:




Enter long 
   100 * (P - Ref(P, } )) / 
   Ref(P, -Opt1{jmplag} ) < Opt2{Xdn%} AND 

   CLOSE > (1 + opt4{Fup%}) * Trough(1,LOW,.5) 

Enter short 
   100 * (P - Ref(P, -Opt1{jmplag} )) / 
   Ref(P, -Opt1{jmplag} ) > Opt3{Xup%} AND 

   CLOSE < (1 + opt5{Fdn%}) * Peak(1,HIGH,.5) 

OPT1 jmplag Range: From 5 to 25 by 5 Current value: 15 
OPT2 Xup% Range: From 3 to 12 by 1 Current value: 6 
OPT3 Xdn% Range: From -12 to -3 by 1 Current value: -7 
OPT4 Fup% Range: From 0.005 to 0.015 by 0.002 Current value: 0.007 
OPT5 Fdn% Range: From -0.015 to -0.005 by 0.002 Current value: -0.015
In this example, I entered optimization variables for all parameters instead of breaking them up, as in Meyers' article, simply to demonstrate how to do so. You may want to follow the steps in the article instead.
Figure 1: XAU COND FUND SYSTEM, METASTOCK FOR WINDOWS. Using
data on the FGOVX and the Philadelphia Stock Exchange gold and silver index (XAU), you can
create a composite chart of the XAU and bond fund in MetaStock, similar to this one.

To perform the walk-through as described in Meyers' article, you can quickly change the date range of the chart by clicking your right mouse button on the date scale and then choosing x-axis properties. To change an optimization variable to a constant, you can add the constant and move the comment brace in front of the optimization variable. For example, in the Enter long formula above, you could change the jmplag variable to 15 by changing "-Opt1{jmplag}" to "15{-Opt1jmplag}." This will make the variable a comment so that the formula will ignore it and use the constant instead.
In addition, any of the system test reports can be copied into any Windows-based spreadsheet to keep track of all the tests as described in Meyers' article. To do this, simply click your mouse inside any report and press Ctrl-C to copy the report to the clipboard. Switch to your spreadsheet and then choose paste.

Note: There is a slight variation between the above formula and the one in Meyers' article. Instead of using the highest high for the last long position or the lowest low in the last short position, I used the value of the last peak and the value of the last trough, respectively.
-- Allan McNichol, Equis International

WAVE WI$E MARKET SPREADSHEET

The following WAVE WI$E formulas compute Dennis Meyers' gold and silver bond fund system:




A: Date           'Read in XAU closing data 
B: XAU 
C: Date           'Read in FGOVX closing data 
D: FGOVX 
E: Xup     .5     'Define your trading constants 
F: Xdn     .5     'Define your trading constants 
G: Fup     .05    'Define your trading constants 
H: Fdn     .05    'Define your trading constants 
I: Xaujmp  100*(XAU-XAU[-10])/XAU[-10] 
J: Swing   @SWING(FGOVX, FUP*100, FDN*100,1) 
K: Buys    @SIGNAL(FGOVX,BUY,XAUJMP < XDN & SWING=1,XAUJMP > XUP & SWING=-1) 
L: 
M:         @PROFIT(K, L, LONG) 
N: Sells   @SIGNAL(FGOVX,BUY,XAUJMP > XUP & SWING=-1,XAUJMP < XDN & SWING=1) 
O: 
P:         @PROFIT(N, O, SHORT)
-- Peter Di Girolamo, Jerome Technology

SMARTRADER

We've had a request to demonstrate how to program the jiggle line, a momentum indicator developed by George Bayer, for SmarTrader users (Figure 2). Using an average price, the positive and negative one-day momentums are summed. The jiggle line is the difference of the weighted positive and negative differences:




avg           (OPEN+HIGH+LOW+CLOSE)/4 
diff          avg-avg[-1] 
pos           IF(diff>0,diff,0) 
Sum5          Sum(pos,5) 
Sum4          Sum(Sum5,4) 
neg           IF(diff<0,diff,0) 
Abs_val neg 
Sum3          Sum(Abs_val,3) 
Sum3_3        Sum(Sum3,3) 
jiggle        Sum4-Sum3_3
FIGURE 2: DEUTSCHEMARK, SMARTRADER. Here's the jiggle line and the Deutschemark.

The jiggle is plotted as a line in its own window. CompuTrac SNAP users can use this system by eliminating the minus sign inside the square brackets.
-- Jim Ritter, Stratagem Software International

TECHNIFILTER PLUS

The implementation of Dennis Meyers' gold and silver bond fund system in TechniFilter Plus is similar to the implementation of his Gold Mining Index (GMI) bond market system, presented in the April 1996 Traders' Tips. One difference is that the earlier system generated its signals from the gold index but traded the 30-year Treasury bond yield. To implement this earlier system, TechniFilter Plus traded the 30-year bond but tested the GMI index. For the gold and silver bond fund system, the signals depend on both the fund being traded (FGOVX) and the gold and silver stock index (XAU). The system buys if FGOVX has moved 0.9% up from a bottom and the XAU has dropped more than 4%. The system sells if FGOVX has moved 0.8% down from a top and XAU has moved up more than 8%.

The TechniFilter Plus strategy that implements Meyers' XAU bond fund system can be seen below. It uses FGOVX as both the trade issue and the test issue. Formula 1 is the percentage change in XAU; the time lag value 15 is a parameter that you can optimize. Formulas 2 and 3 are the high and low prices referred to in the signals. Formulas 4 and 5 are recursive formulas that are paired with signals 1 and 2. Recursive calculations within TechniFilter Plus are defined by signals whose values are stored in corresponding formulas. Thus, formula 4 ultimately will hold the highest high (as defined recursively in signal 1) while not in a short position. Formula 5 will ultimately hold the lowest low (as defined recursively in signal 2) while not in a long position.

Signals 3 and 4 trigger the buy and sell orders. Signal 3 is true if the XAU percent change drops 4% or more and the fund price is 0.9% (the 1.009 number) above the lowest low while you are short. Signal 4 is true if the XAU percent change jumps 8% or more and the fund price is 0.8% (the 0.992 number) below the highest high while you are long. After the initial entry, this strategy is always in the market, either short or long:

Strategy Name: XAU_BOND
FORMULAS




1. name: XAU%(15)        format: ####.## 
   formula: 100*(~<XAU>~-TY&1)/~<XAU>~Y&1 
2. name: HIGH            format: ####.## 
   formula: H 
3. name: LOW             format: ####.## 
   formula: L 
4. name: RECURS_         format: ####.## 
   formula: 0 
5. name: RECURS_         format: ####.## 
   formula: 0
SIGNALS




1. HIGHEST HIGH;(LA<>7) * (F4Y1*(F4Y1>=F2) + F2*(F4Y1<F2)) 
2. LOWEST LOW; (LA<>8) * (F5Y1 * (F5Y1<=F3) + F3*((F5Y1>F3)^(F5Y1=0))) 
3. BUY; (F1<-4) & (F5<>0) & (F2>1.009*F5) 
4. SELL; (F1>8) * (F3<.992*F4)
RULES




1. Reverse Short to Long 1 at Today's Close on signal: S3 
2. Reverse Long to Short 1 at Today's Close on signal: S4
Registered owners of TechniFilter Plus can receive an E-mail copy of this strategy (and other TechniFilter Plus formulas, reports and strategies that have appeared in this column) by sending a request to rtrsoft@aol.com and noting the item(s) you want. You must include your TechniFilter Plus serial number in your request.
-- Clay Burch, RTR Software Inc.