This month's tips include formulas and programs for:
METASTOCK for Windows,
WAVE WI$E Market Spreadsheet,
SMARTRADER and
TECHNIFILTER PLUS,
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.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
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
-- Peter Di Girolamo, Jerome TechnologyA: 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)
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
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
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: 0SIGNALS
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
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.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