May 2001
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:
 
 
TRADESTATION EASYLANGUAGE
METASTOCK FOR WINDOWS
METASTOCK FOR WINDOWS
NEUROSHELL TRADER
NEUROSHELL TRADER
TRADINGSOLUTIONS
BYTE INTO THE MARKET
BYTE INTO THE MARKET
INVESTOR/RT
INVESTOR/RT
WEALTH-LAB.COM
WEALTH-LAB.COM
TECHNIFILTER PLUS
TECHNIFILTER PLUS
WAVE WI$E MARKET SPREADSHEET
WAVE WI$E MARKET SPREADSHEET

or return to May 2001 Contents


TRADESTATION EASYLANGUAGE

"Relative Performance Charting" by Phil Doyle in this issue presents a technique for comparing the rate of price change of two or more tradable instruments. The purpose is to help find the sectors with the best trading opportunities.

Relative performance charting is a built-in feature in TradeStation Pro. After opening a standard linear-scale bar chart, enable Percent Change Charting via the Format Window dialog. This will change the chart to a Percent Change Chart. You can then add additional securities to the same chart for comparison purposes via the Insert Symbol dialog.

--Ramesh Dhingra, Product Manager, EasyLanguage
TradeStation Technologies, Inc. (formerly Omega Research, Inc.)
A wholly owned subsidiary of TradeStation Group, Inc.
https://www.TradeStation.com
GO BACK

METASTOCK FOR WINDOWS

Performance charts, as described in "Relative Performance Charting" by Phil Doyle elsewhere in this issue, can be recreated in MetaStock by the following means:
1 Open the charts you wish to compare, designating one of the charts as your baseline chart.

2 Select "Tile" from MetaStock's Window menu to make all charts visible.

3 Plot the performance indicator into a new inner window in each of the open charts. You will want to change the color of each of the indicators so that you can differentiate between them when they are in the same chart.

4 In a chart other than your baseline chart, select the performance indicator. From here, you will need to either copy and paste or drag and drop (whichever you prefer) the performance indicator on top of the performance indicator in the baseline chart. If prompted, select the "merge with scales on right" option. Repeat the above steps with all the other charts until your baseline chart contains all the other charts' performance indicators.

5 For better viewing, maximize your baseline chart.

To plot the performance of several securities using a different symbol as the base, use these steps:
1 Create the following custom indicator: 2 Open the charts you wish to compare, designating one of the charts as your baseline chart. For this example, let's open EBAY, MSFT, and CSCO, choosing CSCO as our baseline chart.

3 Select "Tile" from MetaStock's Window menu to make all charts visible.

4 Plot the performance indicator into a new inner window in each of the open charts. You will want to change the color of each of the indicators so that you can differentiate between them when they are in the same chart.

5 Drag the performance indicator from Ebay's chart, and place it on top of the performance indicator in your baseline chart (CSCO).

6 Plot the baseline performance indicator directly on top of EBAY's performance indicator in Csco's chart.

7 Move the resulting plot to the chart in which you wish to compare the relative performance in. Close EBAY's chart.

8 Repeat steps 5 through 7 for all other securities.

9 You should be left with a single chart containing all of the baseline performance plots.

In MetaStock Professional version 7.0 and above, the procedure can be simplified by using the Security () function instead of the p variable. However, a separate custom formula needs to be created for each symbol you wish to use as the baseline chart. The formula is written after the following model:
Name: Baseline Performance with .SPX
Formula: Per()-Security(".SPX", Per())
This formula uses the ticker symbol .SPX as the baseline. To use a different symbol, just change .Spx to the desired symbol. In addition, the formula assumes that the ticker symbol of the baseline is located in the same folder as the symbol you are plotting the formula on. If the location is different, you will need to change the formula to include the correct path. For example, if the ticker symbol .SPX were located in the folder C:\MetaStock Data\index, the formula would be written as:
Formula: Per()-Security("C:\MetaStock Data\index\.SPX", Per () )
Using the above formula, MetaStock Pro users can plot this indicator instead of the performance indicator following these directions:
1 Create a custom indicator using the formula listed above.

2 Open the charts you wish to compare, designating one of the charts as your baseline chart.

3 Select "Tile" from MetaStock's Window menu to make all charts visible.

4 Plot the custom indicator into a new inner window in each of the open charts. You will want to change the color of each of the indicators so that you can differentiate between them when they are in the same chart.

5 In a chart other than your baseline chart, select the performance indicator. From here, you will need to either copy and paste or drag and drop (whichever you prefer), the performance indicator on top of the performance indicator in the baseline chart. If prompted, select the "merge with scales on right" option. Repeat the above steps with all of the other charts until your baseline chart contains all of the other charts' performance indicators.

6 For better viewing, maximize your baseline chart.

--Cheryl C. Abram, Equis International, Inc.
https://www.equis.com
GO BACK

METASTOCK FOR WINDOWS

In his article in this issue, "Volume-Weighted Average Price," George Reyna explains how to calculate the volume-weighted average price, or VWAP. These calculations can be duplicated in MetaStock 6.52 or higher with the formulas given here.

To recreate the indicators, select the Indicator Builder from the MetaStock Tools menu. Then click "New" and enter the following formulas:

Name: VWAP (Approximation)
Formula:
sm:=Input("starting month",1,12,1);
sd:=Input("starting day of month",1,31,1);
sy:=Input("starting year",1980,2100,2000);
d1:= sd=DayOfMonth() AND sm=Month() AND sy=Year();
pv:=MP()*Cum(V);
denom:= If(Cum(V)-ValueWhen(1,d1,V)=0,1,Cum(V)-ValueWhen(1,d1,V));

If(BarsSince(d1),(pv)/denom, MP())

Name: VWAP Support/Resistance
Formula: 
sm:=Input("starting month",1,12,1);
sd:=Input("starting day of month",1,31,1);
sy:=Input("starting year",1980,2100,2000);
start:= sd=DayOfMonth() AND sm=Month() AND sy=Year();
pv:=MP()*V;
denom:= If(Cum(V)-ValueWhen(1,start,Cum(V))=0,1,Cum(V)-ValueWhen(1,start,Cum(V)));

If(BarsSince(start),(Cum(pv)-ValueWhen(1,start,Cum(pv)))/ denom,MP())
-- Cheryl C. Abram, Equis International, Inc.
https://www.equis.com
GO BACK

NEUROSHELL TRADER

To implement relative performance charting in NeuroShell Trader, you simply create an indicator that displays the relative performance from a given point in the past. Select "New Indicator ..." from the Insert menu to create the following multipart indicator incrementally using the Indicator Wizard:
Mul2( Sub( Divide( Close,
     SelectiveLag( Close,
     A=B( CumulativeSum(Add2(1,0),0),25),1) ),1), 100 )
In this indicator, the relative performance charting line starts at the 25th bar on the chart. To make the relative performance charting line start at different points on the chart, simply change the number "25" in the indicator to a different starting bar number. You can use the indicator CumulativeSum(Add2(1,0),0) to determine the bar number of any given point on the chart.

The formula I gave for the relative performance indicator displays the relative performance of the current chart's price data. To display the relative performance of different price data on the same graph (Figure 1), simply change the closing price in the indicator to the close of any other instrument data that you wish. To select other instrument data instead of the close, simply press the "Other Instrument Data" button when inserting the close into the indicator and follow the "Other Instrument Data" wizard.

FIGURE 1: NEUROSHELL TRADER. Here's a sample relative performance chart in NeuroShell Trader.


To display the relative performance of the Nasdaq Composite, Standard & Poor's 500, and the DJIA, you would create the following indicators:

Mul2(Sub(Divide(Nasdaq Composite Close,
     SelectiveLag(Nasdaq Composite Close,
     A=B(CumulativeSum(Add2(1,0),0),25),1)), 1), 100)

Mul2(Sub(Divide(S&P 500 Close,
     SelectiveLag(S&P 500 Close,
     A=B(CumulativeSum(Add2(1,0),0),25),1)), 1), 100)

Mul2(Sub(Divide(DJIA Close,
     SelectiveLag(DJIA Close,
     A=B(CumulativeSum(Add2(1,0),0),25),1)),1), 100)
If you want to display relative performance charts using a broad market index as a baseline, simply subtract the broad market index's relative performance chart line from the relative performance chart lines that you wish to be graphed relative to the broad market index baseline (Figure 2).

FIGURE 2: NEUROSHELL TRADER. Here's a sample relative performance chart in NeuroShell Trader with a broad market index baseline.


Users of NeuroShell Trader can go to the STOCKS & COMMODITIES section of the NeuroShell Trader free technical support website to download a relative performance charting custom indicator and a sample relative performance chart.

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

--Marge Sherald, Ward Systems Group, Inc.
301 662-7950, sales@wardsystems.com
www.neuroshell.com
GO BACK

NEUROSHELL TRADER

To implement in NeuroShell Trader George Reyna's VWAP support and resistance indicator as described in "Volume-Weighted Average Price" in this issue, first create three intermediate indicators. Select "New Indicator ..." from the Insert menu to create each of the following indicators using the Indicator Wizard (Figure 3):
CumPv:
CumulativeSum (  Multiply2 ( Average2(High, Low), Volume ),  0  )

CumV:
CumulativeSum ( Volume, 0 )

Bar#:
CumulativeSum ( Add2(1,0), 0 )
FIGURE 3: NEUROSHELL TRADER. Here's how to add the VWAP support and resistance custom indicator, which you can download from the NeuroShell Trader free technical support website, using NeuroShell Trader's Indicator Wizard.


The second step to implementing VWAP support and resistance in NeuroShell Trader is to create the SWAP support and resistance indicator based on the intermediate indicators. Select "New Indicator ..." from the Insert menu to create the following indicator:

VWAP support and resistance

Divide ( 
        Sub (  CumPv,  SelectiveLag( CumPv, A=B(Bar#,25), 1)  ), 
        Sub (  CumV,  SelectiveLag( CumV, A=B(Bar#,25), 1)  )   )


In this indicator, the Vwap support and resistance line starts at the 25th bar on the chart. To make the Vwap support and resistance line start at different points on the chart, simply change the two "25"s in the indicator to a different starting bar number. You can use the intermediate indicator Bar# to determine the bar number of any given point on the chart.

Users of NeuroShell Trader can go to the STOCKS & COMMODITIES section of the NeuroShell Trader free technical support website to download a Vwap support and resistance custom indicator, Bar# custom indicator, and a sample Vwap support and resistance chart such as the one shown in Figure 4.

FIGURE 4: NEUROSHELL TRADER. Here's a sample NeuroShell Trader chart that graphically depicts the VWAP support and resistance indicator.


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

--Marge Sherald, Ward Systems Group, Inc.
301 662-7950, sales@wardsystems.com
www.neuroshell.com
GO BACK

TRADINGSOLUTIONS

"Relative Performance Charting" by Phil Doyle in this issue presents concepts and case studies for using relative charting to identify strong performers in the market.

Basic relative charting is built into the TradingSolutions chart view. Simply select "Display as percent change" from the context menu for the chart and the values will be displayed relative to the first value being displayed. This can be very useful when comparing multiple data series with different price ranges. However, there are times when you may want to calculate this value as a field. For example:

We can create a set of basic functions to easily calculate the percent change from a fixed date. The first thing we need is a function that determines whether the current date is after a given year, month, and day:
Is After Date
Short Name: AfterDate
Inputs: Year, Month, Day
Or (GT (Year (),Year),And (EQ (Year (),Year),Or (GT (Month (),Month),
     And (EQ (Month (),Month),GT (DayOfMonth (),Day)))))
Using this function, we can get the value of a data series on a given date and also calculate the percent change from that value:
Value On Date
Short Name: ValueOn
Inputs: Data, Year, Month, Day
If (AfterDate (Year,Month,Day),If (Prev (1),Prev (1),Data),Data)
Percent Change Since Date
Short Name: %ChangeSince
Inputs: Data, Year, Month, Day
%Diff (Data,ValueOn (Data,Year,Month,Day))
Note: In order for these functions to work correctly, be sure to use TradingSolutions Version 1.2.

Charting the "Percent Change Since Date" function is similar to using Percent Change charting, except that the percent change is calculated from a fixed date. It is also available for use in other calculations. One example of this is creating a baseline relative performance chart function:

Relative Change Since Date
Short Name: RelChangeSince
Inputs: Data, Baseline Data, Year, Month, Day
Sub (%ChangeSince (Data,Year,Month,Day),%ChangeSince (Baseline Data,Year,Month,Day))
Using this function, a relative percent change chart like the one described in the article can be created (Figure 5). Simply use this function to create a field for an entire group of stocks and specify to use price information from an index data series as the baseline data. Then display in a single chart the "Relative change since date" field for each stock you want to compare. Note that in this case, since we have already calculated the percent changes, we do not want the chart to calculate the percent changes of these values.

FIGURE 5: TRADINGSOLUTIONS. Here's a baseline relative performance chart using the S&P 500 and data provided with the evaluation version of TradingSolutions.


These functions are also available in a function file that can be downloaded from our website in the Solution Library section. It can then be imported into TradingSolutions using "Import Functions..." from the File menu.

To apply one of these imported functions to a stock or group of stocks, select "Add New Field..." from the context menu for the stock or group, select "Calculate a value...," then select the desired function from the "Traders Tips Functions" group.

--Gary Geniesse, TradingSolutions Project Lead
NeuroDimension, Inc., 800 634-3327, 352 377-5144
info@tradingsolutions.com, www.tradingsolutions.com
GO BACK

BYTE INTO THE MARKET

Creating the relative performance chart (RPC) shown in the sidebar to the article "Relative Performance Charting" by Phil Doyle elsewhere in this issue and also shown in Figure 6 uses the formula shown in Figure 7 for calculating a percentage RPC.

FIGURE 6: BYTE INTO THE MARKET. Here's a sample relative performance chart in Byte Into The Market. It is plotted using the formula shown in Figure 7.
FIGURE 7: BYTE INTO THE MARKET. Here's the formula to create a relative performance chart in Byte Into The Market.


To create the chart, we created a new chart for MSFT in Byte Into The Market and charted the Rpc formula from the formula editor ("Library-Editor" selection from Charting menu). This creates the red Rpc line for Msft. Then chart the formula again, overlaid in the same pane in blue but with Intc selected as the "Data Name" in the formula editor dialog. Then be sure to right-click the chart pane and turn on "Uniform Y Scaling" from the context menu to bring the two Rpc plots onto the same scale. The formula is also available in a downloadable zip file https://www.tarnsoft.com/rpc.zip at Tarn Software's website.

--Tom Kohl, Tarn Software
303 794-4184, bitm@tarnsoft.com
https://www.tarnsoft.com
GO BACK

BYTE INTO THE MARKET

The Byte Into The Market (BITM) formula for computing the Vwap (volume-weighted average price) support and resistance indicator from the article "Volume-Weighted Average Price" by George Reyna is shown in Figure 8.

FIGURE 8: BYTE INTO THE MARKET. Here's the formula to compute the VWAP support and resistance indicator in Byte Into The Market.


Note that you explicitly locate a local high (to calculate a resistance level) or low (to compute a support level) and set the date to start calculations accordingly, as suggested in the article. In this example, the high/low occurs on September 1, 2000, as in the article's spreadsheet example.

This formula is also available as a downloadable zip file from Tarn Software's website at https://www.tarnsoft.com/vwap.zip.

--Tom Kohl, Tarn Software
303 794-4184, bitm@tarnsoft.com
https://www.tarnsoft.com
GO BACK

INVESTOR/RT

To create a relative performance chart in Investor/RT (Figure 9), first choose from the main menu, "File: New: Chart." Specify the following settings for your new chart (Figure 10).

FIGURE 9: INVESTOR/RT. Here's a sample relative performance chart in Investor/RT. This chart compares the major indices.
FIGURE 10: INVESTOR/RT. To create a relative performance chart in Investor/RT, first choose from the main menu, "File: New: Chart." Specify these settings.


We have chosen to first chart the percent change of the close for the DJIA ($INDU) as a continuous line. Also, you will need to specify a line color and thickness for your DJIA percent change line. We have chosen a one-point blue line in our example. Now click "OK," and you should get a chart showing the percent change for the DJIA.

But what date is this percent change being based on? It's based on the viewing period of the chart. Doubleclick in the horizontal scale at the bottom of the chart to bring up the chart preferences. You will see the section titled "Viewing period" in the upper left of the preferences window. The beginning date of your viewing period dictates the base of reference for your percent change line. We'll choose the "Begin to present" option and give it a beginning date of two years back as an example, as seen in Figure 11.

FIGURE 11: INVESTOR/RT. In the "Viewing period" window, choose the  time period for your chart. Keep in mind the beginning date of your viewing period dictates the base of reference for your percent change line.


Now each data point on the chart should show the percent change from 3/08/99, and we're ready to add other securities to the chart to see their relative performance to the DJIA. For each one, we'll first click the "Add Instrument" button  in the chart toolbar. We'll choose the same settings as we did in the "Create New Chart" window, except this time, we'll select a different ticker symbol and give each a different line color. Then hit "apply" to add each new percent change line to your chart. Repeat this process for as many symbols as you like. In our example, we added Nyse in green, S&P 500 in red, and Nasdaq in black. Once you've finished, you should doubleclick in your vertical scale and ensure that "user multiple scales" is unchecked, so that all lines will use the same scale for relative comparison. In the chart seen in Figure 9, I have also added a few notes and a zero reference line.

--Chad Payne, Linn Software, Inc.
800 546-6842, sales@linnsoft.com
https://www.linnsoft.com
GO BACK

INVESTOR/RT

Investor/RT has a flexible technical indicator in its library of built-in studies called the Indicator Weighted Average, or IWA. The IWA makes it easy to code this month's Traders' Tips topic, the VWAP, presented by George Reyna in "Volume-Weighted Average Price" elsewhere in this issue. (You may recall we also used the IWA indicator to implement last month's Traders' Tips topic, nonlinear filters.)

The IWA is simply a moving average that is weighted using another indicator. The weighting can be based on any of the built-in indicators in the Investor/RT library, or any user-defined custom indicators. The IWA gives the user control over the period, the price data to be weight-averaged (close, high, low, open, hi +lo/2, ohlc/4, and so forth), and the indicator used to weight the data.

When you choose a weighting indicator, you specify the preferences relevant to that indicator.  First, click on the "Add Technical Indicator" button  in the charting toolbar and add the IWA indicator to your chart with the preferences shown in Figure 12.

FIGURE 12: PLOTTING THE VWAP IN INVESTOR/RT. Here, the Volume Analysis Indicator was chosen as the weighting factor.  When you choose a weighting indicator, you specify the preferences relevant to that indicator.


As seen in Figure 12, the Volume Analysis Indicator was chosen as the weighting factor. Click on the Indicator Preferences button and specify the settings for the volume analysis. In this example, specify a smoothing period of one so that raw volume data will be used in weighting the price data. Specify a higher smoothing period if you want to weight using a smoothed volume average (Figure 13).

FIGURE 13: INVESTOR/RT, VOLUME ANALYSIS PREFERENCES. Specify a higher smoothing period if you want to weight using a smoothed volume average.


The raw volume will be used to weight the closing price data and average it over a five-period span. The chart in Figure 14 shows the volume-weighted average (VWAP) in blue, along with a similar RSI-weighted average in gold. The RSI and volume indicators themselves have been added to the two lower windowpanes in Figure 14.

The chart in Figure 14 is a daily chart, but the Iwa can be used in charts of any intraday periodicity as well. Using IWA, Investor/RT users can develop an unlimited array of weighted moving averages and use them in scans, charts, trading signals, and backtests.

FIGURE 14: INVESTOR/RT. Here's a sample VWAP chart in Investor/RT. This is an example of a daily chart, but the IWA can be used in charts of any intraday periodicity as well.
--Chad Payne, Linn Software, Inc.
800 546-6842, sales@linnsoft.com
https://www.linnsoft.com
GO BACK

WEALTH-LAB.COM

Relative performance charts use a common bar as a starting point and display cumulative percentage gain/loss. This method of charting lets you clearly compare different securities or indices (Figure 15).

FIGURE 15: WEALTH-LAB. Here's a sample relative performance chart in Wealth-Lab.


You can easily produce RPC charts using the Wealth-Lab.com website or Wealth-Lab Desktop. We have prepared a sample script comparing the base security (any stock or index that you select) against the DJIA, NYSE Composite, and Nasdaq Composite. It uses a one-year historical period for comparison. You can find this ChartScript at the Wealth-Lab.com website. Just click the "Public ChartScripts" link and execute it using any stock you wish.

Here is the complete WealthScript code:

{ Create RPC Series for the base security }
RPCBase := CreateSeries();

{ Create RPC Series for the DJIA Index }
SeriesDJ := GetExternalSeries( Ô^DJI', #Close );
RPCDJ := CreateSeries();

{ Create RPC Series for NYSE Index }
SeriesNYSE := GetExternalSeries( Ô^NYA', #Close );
RPCNYSE := CreateSeries();

{ Create RPC Series for Nasdaq Composite }
SeriesNas := GetExternalSeries( Ô^IXIC', #Close );
RPCNas := CreateSeries();

{ Select a starting bar exactly 1 year back }
StartBar := BarCount() - 260;
if StartBar < 0 then
        StartBar := 0;

{ Get the closing prices at the start bar for each index }
xFirstBase := PriceClose( StartBar );
xFirstDJ := GetSeriesValue( StartBar, SeriesDJ );
xFirstNYSE := GetSeriesValue( StartBar, SeriesNYSE );
xFirstNas := GetSeriesValue( StartBar, SeriesNas );

{ Populate the RPC Series }
for Bar := StartBar + 1 to BarCount() - 1 do
begin
        xRP := ( ( PriceClose( Bar ) - xFirstBase ) / xFirstBase ) * 100.0;
        SetSeriesValue( Bar, RPCBase, xRP );
        x := GetSeriesValue( Bar, SeriesDJ );
        xRP := ( ( x - xFirstDJ ) / xFirstDJ ) * 100.0;
        SetSeriesValue( Bar, RPCDJ, xRP );
        x := GetSeriesValue( Bar, SeriesNYSE );
        xRP := ( ( x - xFirstNYSE ) / xFirstNYSE ) * 100.0;
        SetSeriesValue( Bar, RPCNYSE, xRP );
        x := GetSeriesValue( Bar, SeriesNas );
        xRP := ( ( x - xFirstNas ) / xFirstNas ) * 100.0;
        SetSeriesValue( Bar, RPCNas, xRP );
end;

{ Create a nice big chart pane and plot the RPCs }
RPCPane := CreatePane( 200, true, true );
PlotSeries( RPCBase, RPCPane, #Black, 2 );
PlotSeries( RPCDJ, RPCPane, #Red, 2 );
PlotSeries( RPCNYSE, RPCPane, #Green, 2 );
PlotSeries( RPCNas, RPCPane, #Blue, 2 );

{ Annotate the pane }
DrawText( ÔBase Security', RPCPane, 4, 4, #Black, 10 );
DrawText( ÔDow Industrials', RPCPane, 4, 20, #Red, 10 );
DrawText( ÔNYSE Composite', RPCPane, 4, 36, #Green, 10 );
DrawText( ÔNasdaq Composite', RPCPane, 4, 52, #Blue, 10 );
--Dion Kurczek, Wealth-Lab.com
773 883-9047, dionkk@ix.netcom.com
https://www.wealth-lab.com
GO BACK

WEALTH-LAB.COM

In "Volume-Weighted Average Price" in this issue, George Reyna describes a method for computing support and resistance curves based on volume-weighted average price.

The technique involves running cumulative totals from a fixed bar on the chart that captures a recent low or high. The resulting curves often act as uncanny areas of support and resistance to future price movements.

You can explore this idea further at Wealth-Lab.com. Click the "Public ChartScripts" link, and then select the "VWAP for support and resistance" ChartScript. Type in any stock symbol and click Submit to display a chart with VWAP support/resistance curves.

In this ChartScript, we look for the most recent 500 bar highs and lows, then pinpoint the precise trough and peak bars on which to begin our Vwap calculations. You can experiment with this script by changing the number of bars to look back, or the percentage reversal level required for peak/trough detection.

Here is the WealthScript code for this ChartScript. Note the use of the DrawLine function, a useful tool for drawing programmable trendlines and support/resistance levels.

{ Draw VWAP Support Level from most recent 400 bar low }
nBarLow := Trunc( LowestBar( BarCount() - 1, #Low, 500 ) );
nBarTrough := TroughBar( nBarLow, #Close, 20 );
nBarTrough := TroughBar( nBarLow, #Close, 20 );
if nBarTrough > 2 then
begin
        cumPV := 0.0;
        cumV := 0.0;
        lastVwap := 0.0;
        for Bar := nBarTrough to BarCount() - 1 do
        begin
                ap := ( PriceHigh( Bar ) + PriceLow( Bar ) ) / 2;
                pv := ap * Volume( Bar );
                cumPV := cumPV + pv;
                cumV := cumV + Volume( Bar );
                if Bar = nBarTrough then
                begin
                        startPV := pv;
                        startV := Volume( Bar );
                end
                else
                begin
                        vwap := ( cumPV - startPV ) / ( cumV - startV );
                        if lastVwap <> 0.0 then
                                DrawLine( Bar - 1, lastVwap, Bar, vwap, 0, #Green, 2 );
                        lastVwap := vwap;
                end;
        end;
end;

{ Draw VWAP Resistance Level from most recent 400 bar high }
nBarHigh := Trunc( HighestBar( BarCount() - 1, #High, 500 ) );
nBarPeak := PeakBar( nBarHigh, #Close, 20 );
nBarPeak := PeakBar( nBarHigh, #Close, 20 );
if nBarPeak > 2 then
begin
        cumPV := 0.0;
        cumV := 0.0;
        lastVwap := 0.0;
        for Bar := nBarPeak to BarCount() - 1 do
        begin
                ap := ( PriceHigh( Bar ) + PriceLow( Bar ) ) / 2;
                pv := ap * Volume( Bar );
                cumPV := cumPV + pv;
                cumV := cumV + Volume( Bar );
                if Bar = nBarPeak then
                begin
                        startPV := pv;
                        startV := Volume( Bar );
                end
                else
                begin
                        vwap := ( cumPV - startPV ) / ( cumV - startV );
                        if lastVwap <> 0.0 then
                                DrawLine( Bar - 1, lastVwap, Bar, vwap, 0, #Red, 2 );
                        lastVwap := vwap;
                end;
        end;
end;
--Dion Kurczek, Wealth-Lab.com
773 883-9047, dionkk@ix.netcom.com
https://www.wealth-lab.com
GO BACK

TECHNIFILTER PLUS

Here is a TechniFilter Plus formula that computes a zero-based comparative performance relative to a fixed point in time. When used in charting, it starts plotting at zero on the left side of the chart and plots the percent change of the issue's current price compared to the issue's initial price at the beginning of the chart.

The parameter in the formula is the ticker symbol of the issue you want to chart. The formula uses the TechniFilter Plus ability to import data on any issue as part of a formula.

Figure 16 shows a six-month chart with the relative strength formula applied to three indices.

FIGURE 16: TECHNIFILTER PLUS. This TechniFilter Plus chart shows the comparative performance of three indices.
Formula for Comparative Relative Strength
NAME: rs
PARAMETERS: IBM
FORMULA: 100 * ( ~<&1>~/TY00 - 1)
--Clay Burch, RTR Software
919 510-0608, E-mail: rtrsoft@aol.com
 https://www.rtrsoftware.com
GO BACK

TECHNIFILTER PLUS

Here is the TechniFilter Plus formula for the Vwap support and resistance indicator from George Reyna's article, "Volume-Weighted Average Price."
Formula for VWAP
NAME: VWAP
SWITCHES: multiline
FORMULA: 
[1]: (H+L) / 2  { Avg Price }
[2]: [1] * V    { PV }
[3]: [2]F0      { cumPV }
[4]: VF0        { cumV }
[5]: [3] / [4]  { S1 or R1 }
Visit RTR's website to download this formula as well as program updates.
--Clay Burch, RTR Software
919 510-0608, E-mail: rtrsoft@aol.com
 https://www.rtrsoftware.com
GO BACK

WAVE WI$E MARKET SPREADSHEET

"Relative Performance Charts" by Phil Doyle in this issue presents a technique for comparing the rate of price change of two or more tradable instruments. The purpose is to help determine the strongest sector for trading.

The following WAVE WI$E formulas demonstrate Doyle's relative performance charting method.

A: DATE         @TC2000(C:\TC2000V3\Data,INTC,Intel Corp,D)
B: Intel        
C: DATE         @TC2000(C:\TC2000V3\Data,MSFT,Microsoft Corp,D)
D: Msft         
E: Rpc_Intel    (B/B$1)-1
F: Rpc_Msft     (D/D$1)-1
G:   
H: chart        @CHART(2)

Ô==========End Formulas
--Peter Di Girolamo, Jerome Technology
908 369-7503, jtiware@aol.com
https://members.aol.com/jtiware
GO BACK

WAVE WI$E MARKET SPREADSHEET

The following WAVE WI$E formula implements George Reyna's weighted approximation formula. Column I (RefDate), which is the reference date, contains the date to begin the calculation.
A:      DATE    @TC2000(C:\TC2000V3\Data,IBM,Internat Business Mach,DB)
B:      HIGH
C:      LOW
D:      CLOSE
E:      OPEN 
F:      VOL 
G:      Avg     (HIGH+LOW)/2
H:      Pv      AVG*VOL/1000
I:      RefDate @IF(A = @DATEVAL("09-01-2000"),@ROW(),REFDATE[-1])
J:      cumPv   @IF(REFDATE >= 1, @CUM(PV))
K:      cumV    @IF(REFDATE >= 1,@CUM(VOL/1000))
L:      S1      @IF(@ROW()>REFDATE, (CUMPV - CUMPV[REFDATE - @ROW()]) / 
                (CUMV-CUMV[REFDATE - @ROW()]))
M:
 
Ô==========End Formulas
--Peter Di Girolamo, Jerome Technology
908 369-7503, jtiware@aol.com
https://members.aol.com/jtiware
GO BACK


EasyLanguage (TradeStation Technologies, Inc.)
MetaStock (Equis International)
NeuroShell Trader (Ward Systems Group)
TradingSolutions (NeuroDimension)
Byte Into The Market (Tarn Software), Investor/RT (Linn Software)
Wealth-Lab.com (Wealth-Lab.com)
TechniFilter Plus (RTR Software)
Wave Wi$e Market Spreadsheet (Jerome Technology)

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


Return to May 2001 Contents