July 2000
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:
 
 
BIOCOMP
NEUROSHELL TRADER
BYTE INTO THE MARKET
TECHNIFILTER PLUS
METASTOCK
WAVEWI$E MARKET SPREADSHEET

or return to July 2000 Contents


BIOCOMP

In "Bollinger Band Targets" by Benjamin Cotton in this issue, the future price that is required to cross a Bollinger Band is calculated. A similar indicator available within Biocomp Profit, WinPctB, calculates price relative to a Bollinger Band. WinPctB is the percentage distance from +/-2 standard deviations from the mean of price over a user-definable time window. Although it doesn't calculate a future price as Cotton describes in his article, WinPctB provides valuable information. To employ the stated transformation, follow these steps:
 
1. Start Biocomp Profit and create a new system.
2. Follow the wizard, and choose to apply the data transformations yourself.
3. Within the "Data Transformation" window, under the "Profit Pro Indicators" dialogue, click on WinPctB.
4. Highlight the input you wish to apply this transformation to.
5. Click "apply." Input the window size. This is the lookback length of the indicator. It must be greater than 1.
FIGURE 1: BIOCOMP PROFIT. A demonstration of the WinPctB indicator in BioComp Profit shows profit in the equity curve of the system model.


Using only the 10-bar WinPctB of the Standard & Poor's 500 open, high, low, close, the previous day's volume, and the previous day's open interest as inputs to 10 models, we were able to create a profitable demonstration of the WinPctB indicator in a matter of minutes. The model returned $167,890 trading one S&P 500 contract. It beat buy and hold of that futures contract by 69%. January 1998 marks the beginning of the out-of-sample period. As the author suggests, price relative to a Bollinger Band can be considered important information.

Rick Heymann, Biocomp Systems, Inc.

800 716-6770, RickH@biocompsystems.com
https://www.biocompsystems.com

GO BACK

NEUROSEHLL TRADER

The indicators that Cotton describes are quite complex and could be simplified and built within NeuroShell Trader; however, with NeuroShell Trader's ability to call external code, we decided to simplify the equation and build custom indicators that do this for you. Users of NeuroShell Trader can go to the STOCKS & COMMODITIES section of the NeuroShell Trader free technical support Website to download the Bogie II indicators.
FIGURE 2: NEUROSHELL TRADER. After downloading the custom indicators, you can insert them into your chart, Prediction, or NeuroShell Trading Strategy using the Indicator Wizard and selecting the "custom indicators" category.


After downloading the custom indicators, you can insert them into your chart, Prediction, or NeuroShell Trading Strategy using the Indicator Wizard and selecting the "custom indicators" category (Figure 2).

Cotton did not go into detail as to how to use these indicators in a trading system; however, we will suggest one way in which you could use the indicators in a Trading Strategy within NeuroShell Trader.

Select "New Trading Strategy É" from the Insert menu and enter the following entry/exit conditions in the appropriate locations of the Trading Strategy Wizard:
 

Long Entry (Figure 3)
Generate a buy long STOP order if ALL of the following are true:
A=B(Close,Close)
with a stop price of
Bogie II ? Top(Close,15,2)
Long Trailing Stop (Figure 4)
 TrailPrice%(Trading Strategy, 10)

FIGURE 3: NEUROSHELL TRADER. Select "New Trading Strategy É" and enter the entry/exit conditions in the Trading Strategy Wizard. 

FIGURE 4: NEUROSHELL TRADER. Enter stop information.

This is similar to using a Bollinger Band breakout method to enter, but it gets you in earlier because the long entry stop anticipates the potential breakout. You may find that your results will improve by varying the parameter values (as with most trading systems). If you own NeuroShell Trader Professional, you can use the Genetic Optimizer to help determine the best parameters.

In addition, you may find the indicators interesting when using the Prediction Wizard to predict future price movements, highs, or lows.

For more information on NeuroShell Trader software, visit www.NeuroShell.com.

Marge Sherald, Ward Systems Group, Inc.


301 662-7950, sales@wardsystems.com
https://www.neuroshell.com

GO BACK

BYTE INTO THE MARKET

We have provided an exact solution for the Bollinger Band problem discussed by Benjamin Cotton in "Bollinger Band Targets" in this issue. In the article, Cotton presents a technique to calculate the future price movement necessary to cross a moving standard deviation band condition such as a Bollinger Band. Our solution, the BollingerBandTarget (BBT) formula, is shown in Figure 5. Traders trying to design mechanical systems based on the BBT will really appreciate the better program-testing speed achieved when using an exact solution.

FIGURE 5: BYTE INTO THE MARKET. BollingerBandTarget. Here is an exact solution to the problem of calculating the future price movement necessary to cross a Bollinger Band.


FIGURE 6: BYTE INTO THE MARKET. Here's the system suggested by Cotton. The BBT formula allows you to see the value of the close required, which will cause a crossing of the close and standard deviation band on the next bar.


FIGURE 7: BYTE INTO THE MARKET. Here's another way to formulate the system as suggested by Cotton.


FIGURE 8: BYTE INTO THE MARKET. Here's an alternative system based on Tarn Software's Bollinger Band targets. The system enters and exits on an intraday basis at the BBT target prices instead of waiting for the close.


We use the sample standard deviation function in Byte Into The Market software to implement this solution. Consequently, the denominator is Length-1 as opposed to Length when calculating the standard deviation (StdDv) and in deriving the BBT formula. The article uses the population standard deviation. If you are using a population standard deviation, you can replace Length-1 by Length and (Length-1)/Length by 1 in the BBT formula expressions for A, B, and C.

The system suggested by Cotton can simply appear as either Figure 6 or 7. This shows how the BBT formula allows you to see the value of the close required, which will cause a crossing of the close and standard deviation band on the next bar. For transactions on close, set the cash management execution tab accordingly. Change the UpperBand variable to false in the BBT formula to compute the target price for the lower band. This is a breakout system that performs well in strongly trending markets.

Figure 8 shows an alternative system using our Bollinger Band targets, with the bands acting more like an overbought/oversold oscillator-based system. This countertrend system will improve performance in trading range markets, but often works poorly in trending markets. The system enters and exits on an intraday basis at the BBT target prices instead of waiting for the close. Excluding price gaps through the BBT bands, it buys on limit orders at the lower BBT band and sells using a limit order at the upper band. You may wish to use a "Round" icon to set buy and sell prices at exact tick values for the markets you trade. Signal timing from the trend and countertrend systems are roughly inverted. You will often find that the percentage of winning trades in the countertrend system will be much higher, but the ratio of average profit to average loss really suffers. We wanted to point out another way of looking at how to use the bands and the projected BBT formula.

The formula and system files for Figures 5-7 and an additional chart template file for comparing the systems (includes both systems, the target formulas, Bollinger Bands, and system equity curves) are available in a downloadable .zip file from https://www.tarnsoft.com/bbt.zip.

--Tom Kohl, Tarn Software, 303 794-4184


bitm@tarnsoft.com, https://www.tarnsoft.com

GO BACK

TECHNIFILTER PLUS

Benjamin Cotton, in "Bollinger Band Targets" in this issue, gives an iterative technique to identify at what closing price tomorrow you would get a cross of the close and either of the Bollinger Bands. He explains the underlying idea of writing an equation with tomorrow's close as an unknown, and then solving the equation to project a target. But instead of solving for the unknown in this case, he uses an iterative technique to project a target price.

It's possible to get a solution in closed form for the equation involved. Below are TechniFilter Plus formulas that compute the target prices for both the top and bottom band. As Cotton noted, the equation in this case is a quadratic. Due to the nature of the physical phenomena involved (the crossing of price and a curve), this equation does in fact have two real solutions, one of which gives the target price for the top band, while the other gives the target price for the bottom band.

In the formulas below, the first parameter is the time period for the Bollinger Band calculation, normally 20. The second parameter is the first parameter minus 1, and the third parameter is the number of standard deviations used, normally 2.

TechniFilter Plus ships with several target formulas in its library, including the crossing of a close and an average, the crossing of two averages, MACD signal targets, and RSI cross targets. All these target-price formulas were generated by solving an algebraic equation for the unknown price.

Target Formula for cross of close and bottom band
NAME: BBBotTarget
PARAMETERS: 20, 19, 2
FORMULA: [1]: &2/&1*&2/&1/&3/&3 - 1/&1  {A}
        [2]: 2/&1*CA&2 - 2/&3/&3*&2/&1*CF&2/&1  {B}
        [3]: (CF&2/&1/&3)*T + CF&2/&1*CA&2-(C/&2*C)F&2 {C}
        [4]: [2]*[2]-4*[1]*[3]  {B2-4AC}
        [5]: (-[2]-[4]_.5)/(2*[1])      {(-B-sqr(B2-4AC))/2A }

Target Formula for cross of close and top band
NAME: BBTopTarget
PARAMETERS: 20, 19, 2
FORMULA: [1]: &2/&1*&2/&1/&3/&3 - 1/&1  {A}
        [2]: 2/&1*CA&2 - 2/&3/&3*&2/&1*CF&2/&1  {B}
        [3]: (CF&2/&1/&3)*T + CF&2/&1*CA&2-(C/&2*C)F&2 {C}
        [4]: [2]*[2]-4*[1]*[3]  {B2-4AC}
        [5]: (-[2]+[4]_.5)/(2*[1])      {(-B+sqr(B2-4AC))/2A }
These formulas can be downloaded from RTR's Website. Release 8.3 of TechniFilter Plus is now available.
Clay Burch, RTR Software

919 510-0608, E-mail: rtrsoft@aol.com
https://www.rtrsoftware.com

GO BACK

METASTOCK

The indicators introduced in the article "Bollinger Band Targets" by Benjamin Cotton in this issue can be recreated in MetaStock 7.0 or higher with the use of the new MetaStock External Function (MSX) DLL Interface. For more information on this new interface or to download the MSX DLL for these indicators, visit https://www.equis.com/free/traderstip/ or send E-mail to sctraderstip@equis.com. Instructions for creating, plotting, and using the formulas in the other MetaStock 7 formula tools will be included on the Web page as well.

Sample source code for the MSX DLL will be available in three languages: C++, PowerBASIC, and Delphi Pascal.

Cheryl C. Abram, Equis International, Inc.

https://www.equis.com

GO BACK

WAVE WI$E MARKET SPREADSHEET

In "Bollinger Band Targets" in this issue, Benjamin Cotton calculates the future price movement necessary to cross a moving standard deviation band condition such as a Bollinger Band. The following Wave Wi$e formulas show how to find the closing price needed to either move above the two?standard deviation band from below, or, if prices are already above the band, find the minimum closing price needed to stay above the two?standard deviation band. Similar formulas may be constructed to compute the lower band.
A: DATE @TC2000(C:\TC2000\DATA,SP-500,STANDARD & POORS 500,DB)
B: HIGH         
C: LOW  
D: CLOSE        
E: OPEN         
F: VOL  
G: extend       @EXTEND(A,1,0)          'Extend data by 1
H: Avg21        @MAVG(CLOSE,21)         'Todays average
I: Std21        @STD(CLOSE,21)          'Todays STD
J: Upper        AVG21+STD21             'Today upper band
K: future       PROCEDURE(UP-PREDICT)   'Predict todays CLOSE
L: 

'PROCEDURE TO PREDICT CLOSE FOR UPPER BAND
#NAME INCR      X$2
#NAME BAND      X$3
#NAME MOVE      X$4
@IF @ROW() = @ENDROW() THEN     'CHECK FOR FINAL ROW
        BAND=@MAVG(CLOSE[-1],21)+@STD(CLOSE[-1],21)
        CLOSE=CLOSE[-1]                 'USE YESTERDAY AS START
        @IF CLOSE > @MAVG(CLOSE,21)+@STD(CLOSE,21) THEN
                MOVE=-1                         'WE NEED TO MOVE DOWN
        ELSE
                MOVE=+1                         'WE NEED TO MOVE UP
        ENDIF   
        @FOR INCR = 0 TO 10000
                @IF MOVE = 1 THEN               'MOVE UP TO BAND
                        CLOSE=CLOSE[-1] + (INCR/100)
                        @IF CLOSE > @MAVG(CLOSE,21)+@STD(CLOSE,21) THEN
                                @RETURN(CLOSE)  'GIVE CLOSE TO GET ABOVE
                        ENDIF
                ELSE                                    'MOVE DOWN TO BAND
                        CLOSE=CLOSE[-1] - (INCR/100)
                        @IF CLOSE < @MAVG(CLOSE,21)+@STD(CLOSE,21) THEN
                                CLOSE=CLOSE + (1/100)
                                @RETURN(CLOSE)  'GIVE CLOSE TO STAY ABOVE
                        ENDIF
                ENDIF
        NEXT
ENDIF
@RETURN(@BLANK())                       'NO VALUE FOUND
==========End Formulas
Peter Di Girolamo, Jerome Technology

908-369-7503, E-mail: jtiware@aol.com
https://members.aol.com/jtiware


All rights reserved. © Copyright 2000, Technical Analysis, Inc.

Return to July 2000 Contents