April TRADERS' TIPS

Here is this month's selection of Traders' Tips, contributed by various developers of technical analysis software to help readers more easily implement some of the strategies presented in this issue.

You can copy these formulas and programs for easy use in your spreadsheet or analysis software. Simply "select" the desired text by highlighting as you would in any word processing program, then use your standard key command for copy or choose "copy" from the browser menu. The copied text can then be "pasted" into any open spreadsheet or other software by selecting an insertion point and executing a paste command. By toggling back and forth between an application window and the open Web page, data can be transferred with ease.

This month's tips include formulas and programs for:

TECHNIFILTER PLUS
SMARTRADER
WAVE WI$E MARKET SPREADSHEET
TRADESTATION
METASTOCK

or return to April Contents

TECHNIFILTER PLUS

This month's TechniFilter Plus strategy is based on Alex Saitta's "Bonds, price momentum and trends" in this issue. After dividing a defined trend into two equal time periods, Saitta compares the price momentum of the first period with the price momentum of the second period. His goal is to identify any patterns that might allow him to use momentum to predict when a trend begins to change. This TechniFilter Plus filter report will perform this type of analysis on an entire database of issues. It is a complex report that uses some advanced techniques to produce the desired calculations.

Formula 1 defines the trend. It is a 5% zigzag of the closing price, which means it uses straight lines to connect peaks and valleys on the price curve that are at least 5% apart. Formula 2 computes the number of days in the most recent downward segment of the zigzag. Formulas 3 and 4 return the values of the most recent peak and valley on the zigzag. Formula 5 computes the midpoint of the down period. Formula 6 returns the closing price at the midpoint day, using the value of the most recent valley (formula 4) as a lookback period to isolate the price. For the first half of the defined trend, formula 7 returns the average price change (or momentum) of the most recent downmove of the zigzag. Formula 8 calculates that value for the second half of the trend. Formula 9 calculates the number of downmoves in the period covered by the report. For all the downmoves covered by the period of the report, formula 10 calculates the average momentum for the first half of the trend. Formula 11 calculates that value for the second half of the trend.

This report looks at the downmoves. To study upmoves, change formula 2 to [1]U41-[1]U51 and switch formulas 7 and 8.





report ID: TREND_MO   report title: TREND MOMENTUM   compress: N 
# of columns: 11    use name or ticker?: T    units to read: 500

 1.  title:    ZIGZAG          format: #####.##
     formula:  CZ5
 2.  title:    DAYS_DOWN       format: #####
     formula:  [1]U51-[1]U41
 3.  title:    PEAK            format: #####.##
     formula:  [1]U31
 4.  title:    VALLEY          format: #####.##
     formula:  [1]U21
 5.  title:    MID_PT          format: ####
     formula:  ([2]+1)\2 * ([2]>0)
 6.  title:    MID_PRICE       format: #####.##
     formula:  ( ([2]>0) * (TY1=0) * CY[5] )U31
 7.  title:    D1              format: #####.##
     formula:  ([6]-[3])/[5] * ([2]>0) * ([2]Y1>0)
 8.  title:    D2              format: #####.##
     formula:  ([4]-[6])/([2]-[5]) * ([2]>0) * ([2]Y1>0)
 9.  title:    #DNS            format: ####
     formula:  ( (([7]<>0) * ([7]=TY1)) * (TY1=0) )F0
10.  title:    AVG_D1          format: #####.##
     formula:  ( (([7]<>0) * ([7]=TY1)) * (TY1=0) * [7])F0 / [9]
11.  title:    AVG_D2          format: #####.##
     formula:  ( (([8]<>0) * ([8]=TY1)) * (TY1=0) * [8])F0 / [9]

This TechniFilter Plus strategy and the reports, strategies and formulas of earlier Traders' Tips can also be downloaded from RTR's Web site.

 

-- Clay Burch, RTR Software
919 510-0608, E-mail: rtrsoft@aol.com
Internet: https://www.rtrsoftware.com

GO BACK

SMARTRADER

This SmarTrader strategy is a variation of Alex Saitta's trend-following system given in "Bonds, price momentum and trends." The major difference is that the momentum calculation is applied to a moving average of the price rather than to the price directly.

Row 9 is a 20-day moving average (Mov_avg) of the closing price. Row 10 is a five-day momentum of the Mov_avg. Row 11 is an exponential moving average of the momentum. Row 12, SMom, which is our indicator, is an exponential moving average of row 11. This results in a very smooth indicator. To this extent, it bears a resemblance to TRIX (an indicator that is the one-period difference of the triple exponential smoothing operating on the log of price).

Row 13 is the buy rule and is true when the SMom indicator reverses to an uptrend. Row 14 is the sell rule and is true when the trend reverses to the downside.

Users of CompuTrac/Snap can implement this system by omitting the minus sign inside the square brackets in the buy and sell rules.

FIGURE 1: SMARTRADER. This SmarTrader SpecSheet implements a variation of Alex Saitta's trend-following system. In this variation, the momentum calculation is applied to a moving average of the price rather than to the price directly.

This SmarTrader SpecSheet (Figure 1) can be downloaded from Stratagem's Web site.

-- Jim Ritter, Stratagem Software International
504 885-7353, E-mail: Stratagem1@aol.com
Internet: https://members.aol.com/stratagem1

GO BACK


WAVE WI$E MARKET SPREADSHEET

We found Alex Saitta's five-step approach to momentum in "Bonds, price momentum and trends" an excellent demonstration of price pattern recognition. The following WAVE WI$E formulas implement Saitta's momentum approach, except for the author's four-point filter. Figure 2 shows the Dow Jones Industrial Average (DJIA) with highs and lows identified versus the high, low and midpoint momentum readings.
FIGURE 2: WAVE WI$E. Here, the highs and lows of the Dow Jones Industrial Average (DJIA) are compared with the high, low and midpoint momentum readings.




A:   DATE   @TC2000(d:\c600\data\tc2000\data\d,DJ-30,DOW JONES INDUSTRIALS,DB)
B:   HIGH 
C:   LOW 
D:   CLOSE 
E:   OPEN 
F:   VOL 
G:   LOWBAR=@BLANK()
H:   Avg    @MAVG(CLOSE,25)
I:   Proc   PROCEDURE(TRENDS)
J:   LowBar
K:   Hibar 
L:   Color  @IF(LOWBAR>0, GREEN+BOLD, @IF(HIBAR>0, RED+BOLD, WHITE))
M:   Trend  @IF(LOWBAR>0, 1, @IF(HIBAR>0, -1, @BLANK()))
N:   TLine  @IF(LOWBAR>0,LOWBAR, @IF(HIBAR>0,HIBAR,@BLANK()))
O:   Dist   @IF(TLINE>0,@ROW()-@ROWOF(@LAST(TLINE[-1])))
P:   MidPt  MIDPT=@BLANK(); MIDPT[-@INT(DIST/2)]=1
Q:   Half1  @IF(MIDPT=1, @IF(@LAST(TREND)=-1, @LAST(HIBAR) - CLOSE ,
   CLOSE- @LAST(LOWBAR)))
R:   Days1  @IF(MIDPT=1, @ROW()-@ROWOF(@LAST(TREND))); @IF(DAYS1=0,1,DAYS1)
S:   Half2  @IF(MIDPT=1,@IF(@NEXT(TREND)=-1,@NEXT(HIBAR) - CLOSE, 
   CLOSE- @NEXT(LOWBAR)))
T:   Days2  @IF(MIDPT=1, @ROWOF(@NEXT(TREND)) - @ROW()); @IF(DAYS2=0,1,DAYS2)
U:   Mom1   HALF1/DAYS1
V:   Mom2   HALF2/DAYS2
W:   MomTot @IF(TREND=-1 | TREND=1, @LAST( MOM2), @IF(MIDPT=1,@LAST(MOM1)))
X:   color2 @IF(MOMTOT>0,YELLOW+BOLD)
Y: 
Z: 

'PROCEDURE TRENDS - IDENTIFIES HIGH AND LOW TURNING POINTS
#NAME LASTLOW Z$1
#NAME LASTHI Z$2
#NAME COUNT Z$3
@IF @ROW()=1 THEN
  LASTLOW=1
  LASTHI=1
ENDIF
LOWBAR=@BLANK()
HIBAR=@BLANK() 
@IF CLOSE[-1] < AVG[-1] & CLOSE > AVG THEN
  COUNT=1+@ROW()-LASTHI
  LASTLOW=@ROWOF(@MIN(LOW,COUNT))
  LOWBAR[LASTLOW-@ROW()]=LOW[LASTLOW-@ROW()]
  @RETURN(1)
ENDIF 
@IF CLOSE[-1] > AVG[-1] & CLOSE < AVG THEN
  COUNT=1+@ROW()-LASTLOW
  LASTHI=@ROWOF(@MAX(HIGH,COUNT))
  HIBAR[LASTHI-@ROW()]=HIGH[LASTHI-@ROW()]
  @RETURN(-1)
ENDIF 
@RETURN(@BLANK())
-- Peter Di Girolamo, Jerome Technology
908 369-7503, E-mail: jtiware@aol.com
Internet: https://members.aol.com/jtiware
GO BACK


TRADESTATION

This month's TradeStation programming tip will focus on "The cumulative market thrust line" by Tushar Chande, which appeared in the STOCKS & COMMODITIES 1997 Bonus Issue. The three indicators described in the article can be created using the Quick Editor functions and indicators below. The creation of each indicator should be preceded by the corresponding function.

The studies given here are designed to be applied on a multisymbol chart with the following symbols (shown here in the Dial Data format):





Data1 = NYSE Composite           (*NYE)
Data2 = Advancing Issues         (*NAZ)
Data3 = Declining Issues         (*NDZ)
Data4 = Advancing Issues Volume  (*NAZVO)
Data5 = Declining Issues Volume  (*NDZVO)

Telescan users should contact Telescan for the Telescan symbol names.

We will begin with the advance-decline line. The ADV_DEC function is written using the following code:





Type: User Function
Name: ADV_DEC

ADV_DEC = ADV_DEC[1] + (ADI - DCI)

After entering the above code in the Quick Editor Function Formula tab, click on the Inputs tab and type and select the following under Name and Default Type:





ADI   NumericSeries
DCI   NumericSeries

Once you have successfully created the ADV_DEC function, you can create the advance-decline line indicator in the Quick Editor using the following code:





Type: Indicator
Name: Advance/Decline Line

Plot1        ADV_DEC(ADI, DCI)

After entering this code in the Quick Editor Indicator Formula tab, click on the Inputs tab and type the following under Name and Default Value:





ADI   Close Data2
DCI   Close Data3

For the market thrust line, you would again begin by first creating the appropriate user function. The Quick Editor code for the MktThrust function would be written using the following code:





Type: User Function
Name: MktThrust

MktThrust = MktThrust[1] + ((ADI * USV) - (DCI * DSV))

After entering this code in the Quick Editor Function Formula tab, click on the Inputs tab and type and select the following under Name and Default Type:





ADI    NumericSeries
DCI    NumericSeries
USV    NumericSeries
DSV    NumericSeries

Once you have successfully created the MktThrust function, you can then create the market thrust line indicator in the Quick Editor using the following code:





Type: Indicator
Name: Market Thrust Line

Plot1      MktThrust(ADI, DCI, USV, DSV)

After entering this code in the Quick Editor Indicator Formula tab, click on the Inputs tab and type the following under Name and Default Value:





ADI    Close Data2
DCI    Close Data3
USV    Close Data4
DSV    Close Data5

Now, for the market thrust oscillator, you would again begin by first creating the appropriate user function. The Quick Editor code for the MktThrustOsc function would be written using the following code:





Type: User Function
Name: MktThrustOsc

MktThrustOsc = ((ADI * USV) - (DCI * DSV)) / ((ADI * USV) + (DCI * DSV))

After entering the above code in the Quick Editor Function Formula tab, click on the Inputs tab and type and select the following under Name and Default Type:





ADI    Numeric
DCI    Numeric
USV    Numeric
DSV    Numeric

Once you have successfully created the MktThrustOsc function, you can then create the Market Thrust Osc indicator in the Quick Editor using the following code:





Type: Indicator
Name: Market Thrust OscLine

Plot1     Average(MktThrustOsc(ADI, DCI, USV, DSV), AvgLen)
Plot2     OBought
Plot3     OSold

After entering the above code in the Quick Editor Indicator Formula tab, click on the Inputs tab and type the following under Name and Default Value:





ADI      Close Data2
DCI      Close Data3
USV      Close Data4
DSV      Close Data5
AvgLen   21
OBought  0.3
OSold    -0.3

This code is available at Omega's Web site. The file name is "MkThrust.ELA."

-- Gaston Sanchez, Omega Research
800 422-8587, 305 270-1095
Internet: https://www/omegaresearch.com
GO BACK


METASTOCK

Many traders prefer to use printed charts to get a quick look at the securities they follow rather than stare at a computer monitor. In MetaStock for Windows, it's easy to open and print a large number of charts. First, open a single chart and specify your settings in the Page Setup and Print dialog boxes. In Page Setup, use the Layout tab to specify how many charts per page to print. Make sure you choose the "Print all open charts as graphics" option in the Print dialog. Choose Print Preview to make sure the settings are correct and then choose Close.

Next, choose Open from the File menu. Hold down the control [Ctrl] key and click on the charts you want to open, or you can select the entire directory by selecting the first security and then pressing Shift+End. If desired, you can choose the Templates button to apply a template to all the securities, or you can just open the SmartCharts. While the charts are opening, press [Ctrl]+P to access the Print dialog and press Enter. As soon as the charts have all opened, MetaStock will print all the charts with the settings you've specified. Note: If you are running Windows 3.x, there may be a limit to the number of charts you can have open. Windows 95 handles resources much better and will allow you to open more charts at once.

-- Allan McNichol, Equis International
800 882-3040, 801 265-8886
Internet: https://www.equis.com

GO BACK


Return to April Contents