November 2004
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 and other issues.

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: TRUE RANGE SPECIFIED VOLUME
METASTOCK: TRUE RANGE SPECIFIED VOLUME
WEALTH-LAB: TRUE RANGE SPECIFIED VOLUME
TRADING SOLUTIONS: TRUE RANGE SPECIFIED VOLUME
AMIBROKER: TRUE RANGE SPECIFIED VOLUME
eSIGNAL: TRUE RANGE SPECIFIED VOLUME
NEUROSHELL TRADER: TRUE RANGE SPECIFIED VOLUME
AIQ: TRUE RANGE SPECIFIED VOLUME
NeoTicker: TRUE RANGE SPECIFIED VOLUME
PROPHET.NET: TRUE RANGE SPECIFIED VOLUME
INVESTOR/RT: TRUE RANGE SPECIFIED VOLUME
SMARTRADER: TRUE RANGE SPECIFIED VOLUME
TECHNIFILTER PLUS: TRUE RANGE SPECIFIED VOLUME
BULLCHARTS: TRUE RANGE SPECIFIED VOLUME
TRADE NAVIGATOR: TRUE RANGE SPECIFIED VOLUME
STOCKWIZ: TRUE RANGE SPECIFIED VOLUME
ASPEN GRAPHICS: TRUE RANGE SPECIFIED VOLUME
or return to November 2004 Contents


TRADESTATION: TRUE RANGE SPECIFIED VOLUME

Vadim Gimelfarb's article in this issue, "Using Volume To Detect Shifts In Power," proposes the TRsV (true range specified volume) indicator. The TRsV indicator is used in the article in conjunction with the bull and bear power indicator described in the October 2003 issue of STOCKS & COMMODITIES. Finally, the two indicators are combined to form a strategy (Figure 1).

FIGURE 1: TRADESTATION, TRsV. Here is a sample chart showing the TRsV (true range specified volume) indicator (middle pane) as well as the bear power and bull power indicators (bottom pane).


The code given here can also be downloaded from TradeStationWorld.com. Look for the file "TRsV.Eld."
 

Indicator: TRsV Volume
inputs:
 AvgTrueRangeLen( 10 ),
  Threshold( 1.5 ) ;
variables:
 TRsV( 0 ),
  MyVolume( 0 ) ;
if BarType < 2 then
 MyVolume = Ticks
else
 MyVolume = Volume ;
Plot1( MyVolume, "Volume" ) ;
TRsV = MyVolume / AvgTrueRange( AvgTrueRangeLen ) ;
if TRsV[1] > 0 then
 begin
 if TRsV / TRsV[1] > Threshold then
  Plot2( MyVolume, "Expanded" ) ;
 end ;
Strategy: Gimelfarb TRsV
inputs:
 AvgTrueRangeLen( 1 ),
  Threshold( 1.5 ),
 Avg( 2 ) ;
variables:
 TRsV( 0 ),
  MyVolume( 0 ),
   ResistanceBar( false ),
 BullPower( 0 ),
 BearPower( 0 ),
  BalanceOfPower( 0 ) ;
if BarType < 2 then
 MyVolume = Ticks
else
 MyVolume = Volume ;
{ Find resistance bars }
TRsV = MyVolume / AvgTrueRange( AvgTrueRangeLen ) ;
if TRsv[1] > 0 then
 begin
 if TRsV / TRsV[1] > Threshold then
  ResistanceBar = true
 else
  ResistanceBar = false ;
 end ;
{ Find bullish/bearish balance of power }
{ Find category of bull power }
if Close < Open then
 if Close[1] < Open then
  BullPower =
   MaxList( High - Close[1], Close - Low )
 else
  BullPower = MaxList( High - Open, Close - Low )
else if Close > Open then
 if Close[1] > Open then
  BullPower = High - Low
 else
  BullPower = MaxList( Open - Close[1], High - Low )
else if ( High - Close ) > ( Close - Low ) then
 if Close[1] < Open then
  BullPower = MaxList( High -  Close[1],
   Close - Low )
 else
  BullPower = High - Open
else if High - Close < Close - Low then
 if Close[1] > Open then
  BullPower = High - Low
 else
  BullPower = MaxList( Open - Close[1], High - Low )
else if Close[1] > O then
 BullPower = MaxList( High - Open, Close - Low )
else if Close[1] < O then
 BullPower = MaxList( Open - Close[1], High - Low )
else
 BullPower = High - Low ;
 
{ Find category of bear power }
if C < O then
 if Close[1] > Open then
  BearPower = MaxList( Close[1] - Open, High - Low )
 else
  BearPower = High - Low
else if Close > Open then
 if Close[1] > Open then
  BearPower = Maxlist( Close[1] - Low,
   High - Close )
 else
  BearPower = Maxlist( Open - Low, High - Close )
else if ( High - Close ) > ( Close - Low ) then
 if Close[1] > Open then
  BearPower = MaxList( Close[1] - Open, High - Low )
 else
  BearPower = High - Low
else if High - Close < Close - Low then
 if Close[1] > Open then
  BearPower = MaxList( Close[1] - Low,
   High - Close )
 else
  BearPower = Open - Low
else if Close[1] > Open then
 BearPower = MaxList( Close[1]- Open, High - Low )
else if Close[1] < O then
 BearPower = MaxList( Open - Low, High - Close )
else
 BearPower = High - Low ;
if BullPower > 0 and BearPower > 0 then
 BalanceOfPower = BullPower/BearPower ;
{ Establish entry stops }
{ If bullish-resistance-bar, set stop at resistance-bar-
high }
if ResistanceBar and BalanceOfPower < 1 then
 Buy next bar at High stop ;
{If bearish-resistance-bar, set stop at resistance-bar-
low }
if ResistanceBar and BalanceOfPower > 1 then
 SellShort next bar at Low stop ;
--Mark Mills
MarkM@TSSec at www.TradeStationWorld.com
EasyLanguage Questions Forum
TradeStation Securities, Inc.
A subsidiary of TradeStation Group, Inc.


GO BACK


METASTOCK: TRUE RANGE SPECIFIED VOLUME

Vadim Gimelfarb's article, "Using Volume To Detect Shifts In Power," already includes the MetaStock code for the TRsV indicator. In case you missed it, we'll re-present it here, along with the steps for inputting it into MetaStock.

To enter this indicator into MetaStock:

1. In the Tools menu, select Indicator Builder.
2. Click New to open the Indicator Editor for a new indicator.
3. Type the name of the formula.
4. Click in the larger window and type in the following formula:
 

Name: TRsV
Formula:
V / ATR( 1 )
--William Golson
Equis International


GO BACK


WEALTH-LAB: TRUE RANGE SPECIFIED VOLUME

We followed most of Vadim Gimelfarb's guidelines in utilizing the TRsV indicator to trigger entries and exits for a script that trades long positions only. Sticking with the factor of 1.5 to indicate TRsV resistance, we also used the relationship between the author's version of bull and bear power to determine the nature of the resistance. A smoothed CMO provided the filtering necessary to increase the system's winning percentage, resulting in uncanny accuracy for many entries (Figure 2). The entry logic purchases a position if bullish resistance occurs with CMO below -20, and the trade is exited upon detection of bearish resistance (Figure 2).
 


FIGURE 2: WEALTH-LAB. TRsV. Pink bars in TRsV's histogram indicate that TRsV is 150% of the previous bar's value. We colored the background green when CMO was below -20, the long setup.


We ran the Wealth-Lab ChartScript named "TRsV Long with CMO Filter" in a Portfolio $imulation on the "Dow 29" from 1/2/1999 to 8/1/2004 with 20 lead bars. For simplicity, we excluded AT&T due to the November 2002 distribution that resulted in an aberration in the price data. In summary, after deducting $8 per trade for commissions, and sizing each position with 8% of total equity, the method handily beat the 2.3% gain of the buy & hold strategy by boasting a 78.2% total gain (10.9% Apr) over the four-year, seven-month $imulation with only 30.6% exposure. Each trade profited 1.9% on average, with a holding period of 14.2 days (Figure 3).
 


FIGURE 3: WEALTH-LAB. TRsV. The system's equity curve is rather smooth and is steadily increasing -- both desirable attributes for a Portfolio $imulation. Compare the nearly 11% APR to buy & hold (blue curve). The inset shows the profit distribution.


None of the many variables in the TRsV ChartScript have been optimized and were truthfully pulled out of thin air. Apart from optimization, some ideas for increasing trading efficiency (and exposure) include adding shorting logic, profit targets, trailing stops, and so on. Traders are always encouraged to test over larger time frames and different markets/conditions prior to employing any methodology.

WealthScript code
 

{$I ‘VolumeColor'}
{$I ‘BullPowerVG'}
{$I ‘BearPowerVG'}
var Bar, p, TRsV, TRsVPane, CMOAvg, CMOPane: integer;
var BPwrPane, hBullVG, hBearVG, BPwrDiff: integer;
var Hold, Resistance, BullishVG, BullishCMO: boolean;
{ Skip AT&T in the Dow30 $imulation }
if GetSymbol = ‘T' then
  exit;
{ Create indicators and plot }
TRsV := DivideSeries( #Volume, TrueRangeSeries );
hBullVG := SMASeries( BullPowerVGSeries, 2 );
hBearVG := SMASeries( BearPowerVGSeries, 2 );
BPwrDiff := SubtractSeries( hBearVG, hBullVG );
CMOAvg := SMASeries( CMOSeries( #Close, 20 ), 8 );
CMOPane := CreatePane( 50, true, true );
TRsVPane := CreatePane( 50, true, true );
BPwrPane := CreatePane( 50, true, true );
PlotSeriesLabel( TRsV, TRsVPane, #Blue, #ThickHist, ‘TRsV' );
PlotSeriesLabel( BPwrDiff, BPwrPane, 650, #ThickHist, ‘SMA(Bear)-SMA(Bull)' );
PlotSeriesLabel( CMOAvg, CMOPane, #Teal, #Thick, ‘SMA(CMO(#Close,20),8)' );
DrawHorzLine( -20, CMOPane, 0, #Dotted );
HidePaneLines;
{ Main Trading Loop }
for Bar := 20 to BarCount - 1 do
begin
  Resistance := @TRsV[Bar] > 1.5 * @TRsV[Bar-1];
  if Resistance then
    SetSeriesBarColor( Bar, TRsV, #Fuchsia );
  BullishVG := @BPwrDiff[Bar] > 0;
  BullishCMO := @CMOAvg[Bar] < -20;
  if not LastPositionActive then
  begin
    if BullishCMO then
      SetBackgroundColor( Bar, #GreenBkg );
    if Resistance and BullishVG and BullishCMO then
      BuyAtMarket( Bar + 1, ‘' );
  end
  else  { Exit logic }
  begin
    p := LastPosition;
    Hold := Bar - PositionEntryBar( p ) <= 2;
    if Resistance and not BullishVG and not Hold then
      SellAtMarket( Bar + 1, p, ‘' );
  end;
end;
--Robert Sucher
www.wealth-lab.com


GO BACK


TRADING SOLUTIONS: TRUE RANGE SPECIFIED VOLUME

In "Using Volume To Detect Shifts In Power," Vadim Gimelfarb introduces his true range specified volume indicator, which determines the amount of resistance to price changes based on the amount of volume required for a price change.

This function can be implemented in TradingSolutions as follows:
 

Name: True Range Specified Volume
Short Name: TRsV
Inputs: Volume, Close, High, Low
Formula:
Div (Volume, TR (Close, High, Low))
The article also mentions trading against this indicator when its value increases by a significant amount. The direction of trading is set using the bull power and bear power indicators described in a previous Traders' Tip (October 2003).

This system can be implemented in TradingSolutions as follows (see Figure 4 for a sample chart):

FIGURE 4: TRADINGSOLUTIONS, TRsV, BEAR POWER, AND BULL POWER. Here is a sample TradingSolutions chart displaying the true range specified volume, bear power, and bull power indicators on McDonald's Corp.
Name: True Range Specified Volume System
Inputs: Threshold (1.5), Volume, Close, Open, High, Low
Enter Long:
GT (%Change(TRsV(Volume, Close, High, Low), 1), Threshold)
GT (MA (BearPower (Close, Open, High, Low), 2), MA (BullPower (Close, Open, High, Low), 2) )
Enter Short:
GT (%Change(TRsV(Volume, Close, High, Low), 1), Threshold)
GT (MA (BullPower (Close, Open, High, Low), 2), MA (BearPower (Close, Open, High, Low), 2) )


These functions are available in a function file that can be downloaded from the TradingSolutions website in the Solution Library section. As with many indicators, these values can make good inputs to neural network predictions.

--Gary Geniesse, NeuroDimension, Inc.
800 634-3327, 352 377-5144
https://www.tradingsolutions.com
GO BACK


AMIBROKER: TRUE RANGE SPECIFIED VOLUME

In "Using Volume To Detect Shifts In Power," Vadim Gimelfarb presents a very simple indicator called true range specified volume (TRsV), which can be implemented in a single line of Afl code in AmiBroker.

The code in Listing 1 plots a TRsV chart along with a color-coded volume histogram chart. In Listing 2, we have provided the code for the smoothed bull and bear power indicators used in the article, together with TRsV. Figure 5 shows both.
 


FIGURE 5: AMIBROKER, TRsV. This screenshot shows a daily chart of McDonald's Corp. [MCD] (upper pane); the TRsV and volume plotted in the middle pane; and bear and bull power plotted in the lower pane.
AmiBroker LISTING 1
// calculate TRsV
TRSV = Volume / ATR( 1 );
// Plot TRsV ...
Plot( TRSV, "TRsV", colorBlue, styleThick );
// ... and color-coded volume
Plot( Volume, "Volume", IIf(  Close > Open, colorGreen, colorRed ), styleHistogram );
LISTING 2
/* Bull-Bear power indicator */
BullPower =
IIf( C < O,
IIf( Ref( C, -1 ) < O,
Max( H - Ref( C, -1 ), C - L ),
Max( H - O, C - L ) ),
IIf( C > O,
IIf( Ref( C, -1 ) > O,
H - L,
Max( O - Ref( C, -1 ), H - L ) ),
IIf( H - C > C - L,
IIf( Ref( C, -1 ) < O,
Max( H - Ref( C, -1 ), C - L ),
H - O ),
IIf( H - C < C - L,
IIf( Ref( C, -1 ) > O,
H - L,
Max( O - Ref( C, -1 ), H - L ) ),
IIf( Ref( C, -1 ) > O,
Max( H - O, C - L ),
IIf( Ref( C, -1 ) < O,
Max( O - Ref( C, -1 ), H - L ),
H - L ) ) ) ) ) );
BearPower =
IIf( C < O,
IIf( Ref( C, -1 ) > O,
Max( Ref( C, -1 ) - O, H - L ),
H-L ),
IIf( C > O,
IIf( Ref( C, -1 ) > O,
Max( Ref( C, -1 ) - L, H - C ),
Max( O - L, H - C ) ),
IIf( H - C > C - L,
IIf( Ref( C, -1 ) > O,
Max( Ref( C, -1 ) - O, H - L ),
H - L ),
IIf( H - C < C - L,
IIf( Ref( C, -1 ) > O,
Max( Ref( C, -1 ) - L, H - C ),
O - L ),
IIf( Ref( C, -1 ) > O,
Max( Ref( C, -1 ) - O, H - L ),
IIf( Ref( C, -1 ) < O,
Max( O - L, H - C ),
H - L ) ) ) ) ) );
Plot( MA( BearPower, 2 ), "2-day MA of BearPower", colorRed );
Plot( MA( BullPower, 2 ), "2-day MA of BullPower", colorGreen );
--Tomasz Janeczko, AmiBroker.com
www.amibroker.com
GO BACK


eSIGNAL: TRUE RANGE SPECIFIED VOLUME

The following eSignal Formula Script (EFS) recreates Vadim Gimelfarb's true range specified volume indicator (TRsV). In addition to the TRsV indicator, the formula also displays the volume as a blue histogram. When the value of the TRsV indicator exceeds 1.5 times the value of the previous bar's TRsV value, the background of the bar is painted light gray to help identify the areas of resistance (Figure 6).

FIGURE 6: eSIGNAL, TRsV. This screenshot shows the true range specified volume indicator on Newmont Mining Corp.


From the Advanced Chart's Edit Studies option, you can turn off the volume display. There are five other parameters that may be customized through Edit Studies as well, including the ATR period length, TRsV line thickness, volume histogram thickness, and the color for both the TRsV and volume.

In his article, Gimelfarb refers to a previous Traders' Tips study based on his October 2003 S&C article, "Bull And Bear Balance Indicator." In that issue we provided three separate EFS formulas, which we have now updated and combined into one with an Edit Studies option to display the indicator as a two-line graph for the bull and bear power indicators (Figure 7), or as a histogram for the power balance indicator.
 


FIGURE 7: eSIGNAL, BBB. This screenshot shows the bull and bear balance indicator on McDonald's Corp.


To download the TRsV.efs or BullBearBalance.efs files, go to our Bulletin Board forums at www.eSignalCentral.com. Visit the EFS Library Discussion Board forum under the eSignal Formula Script (Efs) Central category.
 

/*****************************************************************
Provided By : eSignal. (c) Copyright 2004
Study:        Using Volume to Detect Shifts In Power, by Vadim Gimelfarb
Version:      1.0
9/3/2004
Notes:
The background of the bar changes to light grey when the current
TRsV value exceeds the prior bar's value by more than 1.5.
Formula Parameters:                 Default:
ATR Length                          1
TRsV Thickness                      2
Volume Thickness                    3
TRsV Color                          Color.red
Volume Color                        Color.blue
Display Volume                      true
*****************************************************************/
function preMain() {
    setStudyTitle("True Range Specified Volume ");
    // TRsV
    setCursorLabelName("TRsV", 0);
    setDefaultBarFgColor(Color.red, 0);
    setDefaultBarThickness(2, 0);
   
    // Volume
    setCursorLabelName("Vol", 1);
    setDefaultBarFgColor(Color.blue, 1);
    setDefaultBarThickness(3, 1);
    setPlotType(PLOTTYPE_HISTOGRAM, 1);
    setShowTitleParameters(false);
   
    var fp1 = new FunctionParameter("nTRlength", FunctionParameter.NUMBER);
    fp1.setName("ATR Length");
    fp1.setLowerLimit(0);
    fp1.setDefault(1);
   
    var fp2 = new FunctionParameter("nThick0", FunctionParameter.NUMBER);
    fp2.setName("TRsV Thickness");
    fp2.setLowerLimit(1);
    fp2.setDefault(2);
    var fp2a = new FunctionParameter("nThick1", FunctionParameter.NUMBER);
    fp2a.setName("Volume Thickness");
    fp2a.setLowerLimit(1);
    fp2a.setDefault(3);
    var fp3 = new FunctionParameter("cColor0", FunctionParameter.COLOR);
    fp3.setName("TRsV Color");
    fp3.setDefault(Color.red);
    var fp3a = new FunctionParameter("cColor1", FunctionParameter.COLOR);
    fp3a.setName("Volume Color");
    fp3a.setDefault(Color.blue);
    var fp4 = new FunctionParameter("bVol", FunctionParameter.BOOLEAN);
    fp4.setName("Display Volume");
    fp4.setDefault(true);
}
var bEdit = true;
var nCntr = 0;
var vATR = null;
var nTRsV = null;
var nTRsV1 = null;
function main(nTRlength, nThick0, nThick1, cColor0, cColor1, bVol) {
    if (bEdit == true) {
        setDefaultBarFgColor(cColor0, 0);
        setDefaultBarThickness(nThick0, 0);
        setDefaultBarFgColor(cColor1, 1);
        setDefaultBarThickness(nThick1, 1);
        if (vATR == null) vATR = new ATRStudy(nTRlength);
        bEdit = false;
    }
    if (getBarState() == BARSTATE_NEWBAR && nTRsV != null) {
        nTRsV1 = nTRsV;
        nCntr++;
        if (nCntr > 200) nCntr = 0;
    }
    bVol = eval(bVol);
   
    var nATR = vATR.getValue(ATRStudy.ATR);
    if (nATR == null) return;
   
    var nVol = volume();
    if (nATR == 0) {
        nTRsV = 0;
    } else {
        nTRsV = nVol / nATR;
    }
   
    if (nTRsV1 != null) {
        if ( (nTRsV / nTRsV1) > 1.5) setBarBgColor(Color.lightgrey);
    }
   
    if (!bVol) nVol += "";
   
   
    return new Array(nTRsV, nVol);
}
/*****************************************************************
Provided By : eSignal. (c) Copyright 2004
Study:        Bull And Bear Balance Indicator, by Vadim Gimelfarb
Version:      2.0
9/8/2004
Notes:
Formula Parameters:                 Default:
    Smoothing Length                2
    Thickness                       2
    Bull Color                      Color.blue
    Bear Color                      Color.red
    Graph Type                      Lines
        [Lines, Histogram]
*****************************************************************/
function preMain() {
    setStudyTitle("Bull And Bear Balance ");
    setShowTitleParameters(false);
    setCursorLabelName("Bull", 0);
    setCursorLabelName("Bear", 1);
   
    setDefaultBarFgColor(Color.blue, 0);
    setDefaultBarFgColor(Color.red, 1);
   
    addBand(0, PS_SOLID, 1, Color.grey, "zero");
   
   
    var fp1 = new FunctionParameter("nLength", FunctionParameter.NUMBER);
    fp1.setName("Smoothing Length");
    fp1.setLowerLimit(1);
    fp1.setDefault(2);
   
    var fp2 = new FunctionParameter("nThick", FunctionParameter.NUMBER);
    fp2.setName("Thickness");
    fp2.setLowerLimit(1);
    fp2.setDefault(2);
    var fp3 = new FunctionParameter("cColor0", FunctionParameter.COLOR);
    fp3.setName("Bull Color");
    fp3.setDefault(Color.blue);
    var fp4 = new FunctionParameter("cColor1", FunctionParameter.COLOR);
    fp4.setName("Bear Color");
    fp4.setDefault(Color.red);
    var fp5 = new FunctionParameter("sType", FunctionParameter.STRING);
    fp5.setName("Graph Type");
    fp5.addOption("Lines");
    fp5.addOption("Histogram");
    fp5.setDefault("Lines");
}
var bEdit = true;
var nCntr = 0;
var bNew = false;
var nPB = null;
var nPB1 = null;
var nBull = null;
var nBear = null;
var nBullMA = null;
var nBearMA = null;
var nBullMA1 = null;
var nBearMA1 = null;
var aBull = null;
var aBear = null;
function main(nLength, nThick, cColor0, cColor1, sType) {
    if (bEdit == true) {
        aBull = new Array(nLength);
        aBear = new Array(nLength);
        setDefaultBarThickness(nThick, 0);
        setDefaultBarThickness(nThick, 1);
        setDefaultBarFgColor(cColor0, 0);
        setDefaultBarFgColor(cColor1, 1);
        switch (sType) {
            case "Lines" :
                setCursorLabelName("Bull", 0);
                setCursorLabelName("Bear", 1);
                setPlotType(PLOTTYPE_LINE, 0);
                setPlotType(PLOTTYPE_LINE, 1);
                break;
            case "Histogram" :
                setCursorLabelName("Power Balance", 0);
                setCursorLabelName("Power Balance", 1);
                setPlotType(PLOTTYPE_INSTANTCOLORLINE, 0);
                setPlotType(PLOTTYPE_HISTOGRAM, 1);
                break;
        }
        bEdit = false;
    }
    if (getBarState() == BARSTATE_NEWBAR) {
        nPB1 = nPB;
        nBullMA1 = nBullMA;
        nBearMA1 = nBearMA;
        if (nBull != null) {
            aBull.pop();
            aBull.unshift(nBull);
        }
        if (nBear != null) {
            aBear.pop();
            aBear.unshift(nBear);
        }
        nCntr++;
        if (nCntr > 200) nCntr = 0;
    }
    var C = close(0);
    var O = open(0);
    var H = high(0);
    var L = low(0);
   
    var C1 = close(-1);
    if (C1 == null) return;
   
    //Bull Power
    nBull = null;
    if (C < O) {
        if (C1 < O) {
            nBull = Math.max(H-C1, C-L);
        } else {
            nBull = Math.max(H-O, C-L);
        }
    } else if (C > O) {
        if (C1 > O) {
            nBull = (H-L);
        } else {
            nBull = Math.max(O-C1, H-L);
        }
    } else if (H-C > C-L) {
        if (C1 < O) {
            nBull = Math.max(H-C1, C-L);
        } else {
            nBull = (H-O);
        }
    } else if (H-C < C-L) {
        if (C1 > O) {
            nBull = (H-L);
        } else {
            nBull = Math.max(O-C1, H-L);
        }
    } else if (C1 > O) {
        nBull = Math.max(H-O, C-L);
    } else if (C1 < O) {
        nBull = Math.max(O-C1, H-L);
    } else {
        nBull = Math.max(O-C1, H-L);
    }
    aBull[0] = nBull;
   
    //Bear Power
    nBear = null;
    if (C < O) {
        if (C1 > O) {
            nBear = Math.max(C1-O, H-L);
        } else {
            nBear = (H-L);
        }
    } else if (C > O) {
        if (C1 > O) {
            nBear = Math.max(C1-L, H-C);
        } else {
            nBear = Math.max(O-L, H-C);
        }
    } else if (H-C > C-L) {
        if (C1 > O) {
            nBear = Math.max(C1-O, H-L);
        } else {
            nBear = (H-L);
        }
    } else if (H-C < C-L) {
        if (C1 > O) {
            nBear = Math.max(C1-L, H-C);
        } else {
            nBear = (O-L);
        }
    } else if (C1 > O) {
        nBear = Math.max(C1-O, H-L);
    } else if (C1 < O) {
        nBear = Math.max(O-L, H-C);
    } else {
        nBear = (H-L);
    }
    aBear[0] = nBear;
   
    // Smoothing
    var dSumBull = 0;
    var dSumBear = 0;
    for (var i = 0; i < nLength; i++) {
        dSumBull += aBull[i];
        dSumBear += aBear[i];
    }
    nBullMA = dSumBull/nLength;
    nBearMA = dSumBear/nLength;
   
    // Alert Arrows
    if (sType == "Histogram") {
        nPB = (nBullMA - nBearMA);
        nBullMA = nBearMA = nPB;
        if (nPB >= 0) {
            setBarFgColor(cColor0, 0);
            setBarFgColor(cColor0, 1);
        } else {
            setBarFgColor(cColor1, 0);
            setBarFgColor(cColor1, 1);
        }
        if (nPB >= 0 && nPB1 < 0) {
            bNew = true;
            drawShapeRelative(0, 5, Shape.UPARROW, null, Color.green, Shape.TOP|Shape.RELATIVETOTOP, "up"+nCntr);
        } else if (bNew == true) {
            removeShape("up"+nCntr);
        }
        if (nPB <= 0 && nPB1 > 0) {
            bNew = true;
            drawShapeRelative(0, 5, Shape.DOWNARROW, null, Color.red, Shape.BOTTOM|Shape.RELATIVETOBOTTOM, "dn"+nCntr);
        } else if (bNew == true) {
            removeShape("dn"+nCntr);
        }
    } else {
        if (nBullMA >= nBearMA && nBullMA1 < nBearMA1) {
            bNew = true;
            drawShapeRelative(0, 5, Shape.UPARROW, null, Color.green, Shape.TOP|Shape.RELATIVETOTOP, "up"+nCntr);
        } else if (bNew == true) {
            removeShape("up"+nCntr);
        }
        if (nBullMA <= nBearMA && nBullMA1 > nBearMA1) {
            bNew = true;
            drawShapeRelative(0, 5, Shape.DOWNARROW, null, Color.red, Shape.BOTTOM|Shape.RELATIVETOBOTTOM, "dn"+nCntr);
        } else if (bNew == true) {
            removeShape("dn"+nCntr);
        }
    }
   
    return new Array(nBullMA, nBearMA);
}
    --Jason Keck
eSignal, a division of Interactive Data Corp.
800 815-8256, www.esignalcentral.com


GO BACK


NEUROSHELL TRADER: TRUE RANGE SPECIFIED VOLUME

Vadim Gimelfarb's true range specified volume (TRsV) indicator can be easily implemented in NeuroShell Trader by combining a few of NeuroShell Trader's 800+ indicators (see sample chart in Figure 8). To implement TRsV, select "New Indicator ..." from the Insert menu and use the Indicator Wizard to create the following indicator:

    Divide ( Volume, TrueRange(High, Low, Close) )
*Note that the true range indicator is included in the NeuroShell Trader Advanced Indicator Set Add-on and is also available for free download from the Ward Systems Group free technical support website.
 


FIGURE 8: NEUROSHELL TRsV. This NeuroShell Trader chart displays a true range specified volume chart and trading system.


To recreate the true range specified volume trading system, select "New Trading Strategy ..." from the Insert menu and enter the following entry and exit conditions in the appropriate locations of the Trading Strategy Wizard:
 

  Generate a buy long MARKET order if ALL of the following are true:
A>B ( TRsV, Lag (TRsV, 1 )  )
A>B ( Avg ( BullPower(Open,High,Low,Close), 2), Avg ( BearPower(Open,High,Low,Close), 2) )
  Generate a sell long STOP order if ALL of the following are true:
A>B ( TRsV, Lag (TRsV, 1 )  )
Stop Price = Low
  Generate a sell short MARKET order if ALL of the following are true:
A>B ( TRsV, Lag (TRsV, 1 )  )
A>B ( Avg ( BearPower(Open,High,Low,Close), 2), Avg ( BullPower(Open,High,Low,Close), 2) )
  Generate a cover short STOP order if ALL of the following are true:
A>B ( TRsV, Lag (TRsV, 1 )  )
Stop Price = High


*Note that the creation of the BullPower and BearPower indicators are described in the NeuroShell Trader October 2003 Trader's Tip.

If you have NeuroShell Trader Professional, you can also choose whether the system parameters should be optimized. After backtesting the trading strategy, use the "Detailed Analysis ..." button to view the backtest and trade-by-trade statistics for the true range specified volume trading system.

Users of NeuroShell Trader can go to the STOCKS & COMMODITIES section of the NeuroShell Trader free technical support website to download a sample chart that includes the true range specified volume indicator; the true range indicator; and the bull power and bear power indicators, in addition to the true range specified trading system.

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


AIQ: TRUE RANGE SPECIFIED VOLUME

This AIQ code is based on "Using Volume To Detect Shifts In Power" by Vadim Gimelfarb.
 

!TRUE RANGE SPECIFIED VALUE (TRsV)
!Author: Vadim Gimelfarb, "Using Volume To Detect Shifts In  Power, TASC November 2004
!Coded by: Richard Denning  9/6/04   !FORMULAS
!TRsV =  Volume / TR
! TR = true range   !TRUE RANGE
Dailyrange   is [high]-[low].
YcloseL   is  abs(val([close],1)-[low]).
YcloseH   is  abs(val([close],1)-[high]).
TR is  Max(Dailyrange,Max(YcloseL,YcloseH)).   !TRsV
TRsV is [volume] / TR. !Plot the above user defined functions as a single-line indicator.   !COLOR BAR ALERT
Alert    if TRsV > valresult(TRsV,1) * 1.5.   !BULL AND BEAR BALANCE  INDICATOR
!Author: Vadim Gimelfarb, "Bull and Bear Balance Indicator", TASC  Oct 2003, pp. 68-72
!Coded by Rich Denning 8/14/03   !ABBREVIATIONS
C   is [close].
C1  is val([close],1).
O  is [open].
H   is [high].
L  is [low].   BullPwr  is  iff(C<O,iff(C1<O,max(H-C1,C-L),max(H-O,C-L)),
                iff(C>O,iff(C1>O,H-L,max(O-C1,H-L)),
                iff(H-C>C-L,iff(C1<O,max(H-C1,C-L),H-O),
                iff(H-C<C-L,iff(C1>O,H-L,max(O-C1,H-L)),
                iff(C1>O,  max(H-O,C-L),
                iff(C1<O,max(O-C1,H-L),H-L)))))) * 100.
               BearPwr  is  iff(C<O,iff(C1>O,max(C1-O,H-L),H-L),
                iff(C>O,iff(C1>O,max(C1-L,H-C),max(O-L,H-C)),
                iff(H-C>C-L,iff(C1>O,max(C1-O,H-L),H-L),
                iff(H-C<C-L,iff(C1>O,max(C1-L,H-C),O-L),
                iff(C1>O,max(C1-O,H-L),
                iff(C1<O,max(O-L,H-C),H-L)))))) * 100.
               s2BullPwr is  simpleavg(BullPwr,2).
s2BearPwr is  simpleavg(BearPwr,2).
   !Plot s2BullPwr &  s2BearPwr as a two line indicator and use in conjunction with TRsV
    to determine  direction of signal   BuyAlert if TRsV >  valresult(TRsV,1) * 1.5 and
    s2BullPwr < s2BearPwr.
SellAlert if TRsV  > valresult(TRsV,1) * 1.5 and s2BullPwr > s2BearPwr.
   !Use the color bar studies  to identify the BuyAlerts and SellAlerts on the chart


 A sample Aiq chart showing the TRsV is in Figure 9.
 


FIGURE 9: AIQ,  TRsV. This AIQ chart displays the true range specified volume.


-- Richard Denning
www.aiq.com


GO BACK


NeoTicker: TRUE RANGE SPECIFIED VOLUME

No programming is needed to implement in NeoTicker the concept presented in "Using Volume To Detect Shifts In Power" by Vadim Gimelfarb. The true range specified volume (TRsV) indicator can be constructed using NeoTicker's built-in indicator called the formula indicator. The formula indicator interprets and charts formula code written in the NeoTicker formula language.

Add the formula indicator to the data series. At the "Add Indicator" window, in the "Plot1" field, type:
 

vol(data1)/avgtruerange(data1,10)


(see Figure 10). After the formula is entered, click Apply. NeoTicker will then plot the TRsV.
 


 
FIGURE 10: NEOTICKER, TRsV. Add the formula indicator to the data series at the "Add Indicator" window. In the "Plot1" field, type: "vol(data1)/avgtruerange(data1,10)."


To set up the Newmont Mining Corp. chart, as was shown in Gimelfarb's article, first add the daily data series to the chart, then use the formula indicator to construct the TRsV indicator as just discussed.

Next, add the volume indicator. At the Visual tab, change the "Pane" to "2." This will force the volume indicator to show up in the same pane as the TRsV indicator  (Figure 11).
 


FIGURE 11: NEOTICKER, TRsV. Here is the TRsV indicator and the volume indicator plotted in the same pane on Newmont Mining Corp.


Next, add the bull power indicator to the data series. Then add a two-period simple moving average to the bull power indicator. To do so, use the bull power as the base link in the Link setting of the Add Indicator window. Then enter "2" at the period parameter field. Do the same with the bear power indicator. This completes the chart setup (Figure 12).
 


FIGURE 12: NEOTICKER, BULL/BEAR POWER INDICATOR. Add the bull power indicatore to the data series, then add a two-period simple moving average to the bull power indicator.
 

The NeoTicker package with the two charts based on Gimelfarb's article will be available for download from the NeoTicker Yahoo! User Group site.

--Kenneth Yuen, TickQuest Inc.
www.tickquest.com


GO BACK


PROPHET.NET: TRUE RANGE SPECIFIED VOLUME

The true range specified volume (TRsV) indicator as described by Vadim Gimelfarb in his article in this issue is available on the Prophet.Net website to all premium members. No coding is required on the part of the user. The indicator is built into the JavaCharts applet.

There are two indicators in JavaCharts based on Gimelfarb's article: the true range indicator and true range specified volume indicator. Both are useful as confirming signals when you suspect a reversal. For one-click access to these indicators, go to JavaCharts from your web browser by clicking on "Analyze," then "JavaCharts":
 


or go to https://www.prophet.net/analyze/javacharts.jsp.  Click on the Tools menu, which is also accessible by right-clicking anywhere on the chart, and choose "Apply Studies" from the Studies menu item. The list of available studies (approximately 150, shown in alphabetical order) is in the second dropdown menu; you can choose the true range indicator and true range specified volume indicator from the list.

In the sample chart shown in Figure 13, Intel's rise from May 1998 to May 1999 is tracked by the TRsV, shown in blue in the lower chart. The TRsV spiked on June 2, 1998, and October 14, 1998. Both indicate support levels and reversals for the stock.
 


FIGURE 13: PROPHET, TRsV. This sample chart shows Intel's rise from May 1998 to May 1999 as tracked by the true range specified volume (TRsV), shown in blue in the lower chart. The TRsV spiked on June 2, 1998, and October 14, 1998. Both indicate support levels and reversals for the stock.


Full access to the JavaCharts study set requires a premium membership at Prophet.net. Premium memberships start at $14.95 per month; real-time market data is available for equities, options, and futures. A seven-day, risk-free trial is available, which will provide immediate access to all features and studies, from this link: https://www.prophet.net/tasc.

--Jai Saxena
Prophet Financial Systems, Inc.
650 322-4183 ext. 107
jai@prophet.net


GO BACK


INVESTOR/RT: TRUE RANGE SPECIFIED VOLUME

Vadim Gimelfarb's true range specified volume (TRsV) indicator can be replicated in Investor/RT with a custom indicator. The syntax of the TSsV custom indicator follows:

 VO / TR.1


The TRsV custom indicator is shown in the middle pane of the chart in Figure 14, drawn as a blue, stepped line overlaying the volume bars.
 


FIGURE 14: INVESTOR/RT, TRsV. This Investor/RT daily candlestick chart of MSFT shows the TRsV indicator in the middle pane, drawn as a blue stepped line,  overlaying a volume histogram. In the lower pane, the bull power indicator is drawn as a green histogram with the bear power drawn as a red stepped line.


The TSsV was calculated using an average true range (TR) computed over 20 periods/days. In the lower pane of Figure 14, the bull power (green histogram) and bear power (red stepped line) indicators are drawn.

Related links:
https://www.linnsoft.com/tour/techind/bull.htm
https://www.linnsoft.com/tour/techind/bear.htm
https://www.linnsoft.com/tour/techind/trueRange.htm
https://www.linnsoft.com/tour/customIndicator.htm
https://www.linnsoft.com/tour/techind/volume.htm

 
--Chad Payne, Linn Software
800-546-6842, info@linnsoft.com
www.linnsoft.com


GO BACK


SMARTRADER: TRUE RANGE SPECIFIED VOLUME

The TRsV indicator presented by Vadim Gimelfarb in "Using Volume To Detect Shifts In Power" is easily implemented in SmarTrader using only three elements.

The SmarTrader specsheet is shown in Figure 15. First, we add the true range indicator, Tr_rang, which was originally developed by J. Welles Wilder. Then we add a user formula to divide volume, VOL, by Tr_rang, creating TRsV. Finally, we added an alarm that detects when TRsV exceeds the previous TRsV by 1.5 times. The alarm will allow the use of SmartBars to highlight signals on the bar chart.

FIGURE 15: SMARTRADER, TRsV SPECSHEET. Here is the specsheet for recreating the TRsV indicator.


We then plotted the bar chart and added SmartBars in red. In the bottom chart pane, we plotted the volume histogram and a line for the TRsV indicator. (See Figure 16.)

FIGURE 16: SMARTRADER, TRsV. This sample bar chart shows SmartBars in red. The bottom pane shows the volume histogram and the TRsV as a line.
For more information on SmarTrader or to download a copy of this SmarTrader specsheet, go to our website at www.stratagem1.com.
--Jim Ritter, Stratagem Software
 800-779-7353 or 504-885-7353,
info@stratagem1.com, Stratagem1@aol.com
www.stratagem1.com


GO BACK


TECHNIFILTER PLUS: TRUE RANGE SPECIFIED VOLUME

Here are the TechniFilter Plus formulas that recreate the indicators given in "Using Volume To Detect Shifts In Power" by Vadim Gimelfarb in this issue. A sample chart is shown in Figure 17.
 


FIGURE 17: TECHNIFILTER PLUS, TRsV. Blue diamonds indicate where the TRsV is greater than 1.5 times the previous day's value. Dotted green and red lines are the short-term resistance and support lines based on pivot point reversals.
NAME:  TRsV
PARAMETERS:
1
FORMULA:
V/(((H%CY1)-(L#CY1))X&1)
NAME:   TRsVColorBar
PARAMETERS:
1,1.5
FORMULA:
(V/(((H%CY1)-(L#CY1))X&1))>(TY1*&2)


 Visit the new home of Technifilter Plus at https://www.technifilter.com to download these formulas.

 
--Benzie Pikoos, Brightspark
+61 8 9375-1178
sales@technifilter.com
www.technifilter.com


GO BACK


FINANCIAL DATA CALCULATOR: TRUE RANGE SPECIFIED VOLUME

Financial Data Calculator (FDC) can easily reproduce the TRsV indicator described by Vadim Gimelfarb in his article in this issue (Figure 18). The formula quite simply is:
 

 (Vol #r) / (TR #r)


where r is the dataset containing price and volume. Naturally, a macro could be created using the formula, if desired.
 


FIGURE 18: FINANCIAL DATA CALCULATOR, TRsV. Here is Vadim Gimelfarb's true range specified volume indicator in FDC.


Applying this formula to the S&P 500 since 1998 shows considerable ultra-short-term (that is, two- and three-day) cyclicality. Adjusting for that cyclicality (without introducing lag) and turning the result into an oscillator gives an interesting picture. (Try viewing an SPX chart of the last year.)

From inspection of the data, it would seem that, broadly speaking, the TRsV concurs with price activity. That is, relatively high levels of the TRsV seem to be coincident with relatively high levels of the stock index, and vice versa. Further analysis reveals that TRsV and the SPX exhibit positive correlation such that 48% of the variance of one can be explained by the other. As the numerator (volume) is more volatile than the denominator (TR), TRsV is more reflective of changes in volume. We should not be surprised to confirm that the stock market is more attractive to investors (as evidenced by greater volume) when the stock market is at higher levels.

-- William Rafter, President, 856 857-9088
Mathematical Investment Decisions Inc.
(formerly Futures Software Associates)
www.financialdatacalculator.com


GO BACK


BULLCHARTS: TRUE RANGE SPECIFIED VOLUME

In his article, "Using Volume To Detect Shifts In Power," Vadim Gimelfarb proposes the true range specified volume indicator. To add this indicator to your BullCharts toolkit, follow these simple steps:

1. Select "Indicator Builder," located in the Tools menu
2. Press the New button to create a new indicator
3. Enter the formula name "TRsV"
4. Enter the following BullScript, then press OK.
 

{The TRsV indicator}
[citation="Stocks & Commodities, Nov 04 - Using Volume To Detect Shifts In Power by Vadim Gimelfarb"]
Volume/TR;
(Alternatively, you can just type in V/TR.)
The TRsV indicator can now be easily added to your chart (Figure 19) by selecting Insert Indicators, then the TRsV indicator. To make the indicator appear in the volume pane, press "Next," then select "Volume" and "Display new scale on left" in the Location tab.
 


FIGURE 19: BULLCHARTS, TRsV. You can create and insert into a BullChart the TRsV indicator. You can make the indicator appear in the same pane as volume.


If you find that you're using the TRsV indicator frequently, you can also add it to your toolbar for ready access.

--Peter Aylett, BullSystems
www.bullsystems.com
GO BACK


TRADE NAVIGATOR: TRUE RANGE SPECIFIED VOLUME

In Trade Navigator Gold and Platinum versions, you can create custom functions to display on the chart as indicators. In this way, you can add your own indicators to the indicators already provided in Trade Navigator, or you can add indicators from traders who have provided formulas for their indicators in books or magazines.

The TradeSense formula to recreate the TRsV indicator, as described by Vadim Gimelfarb in this issue, is very simple and straightforward:
 

  Volume / True Range


To add TRsV to the list of indicators in Trade Navigator, follow these steps:

1)  Go to the Edit menu and click on Functions. This will bring up the Trader's Toolbox already set to the Functions tab.
2)  Click on the New button.
3) Type the formula Volume / True Range into the Function window.
4)  Click on the Save button, type in a name for the function, and then click the OK button.

You can add this new TRsV indicator to a Trade Navigator chart (Figure 20) by clicking on the chart, typing "A," selecting the Indicators tab, selecting TRsV (if this is what you chose to name the indicator) from the list, and clicking the Add button. You may then click and drag the indicator to the desired pane by clicking and dragging the indicator's label into that pane.

FIGURE 20: TRADE NVAIGATOR, TRSV CHART. Here's a sample Trade Navigator chart displaying the new TRsV indicator.
--Michael Herman
Genesis Financial Technologies
https://www.GenesisFT.com


GO BACK


STOCKWIZ: TRUE RANGE SPECIFIED VOLUME

This StockWiz formula screens all companies and selects only those for which the latest true range specified volume indicator (TRsV) has exceeded its preceding value by more than 1.5 times, as described in this issue's article by Vadim Gimelfarb, "Using Volume To Detect Shifts In Power." The StockWiz user can also view OHLC and candlestick charts of the selected companies as well as other technical analysis indicators for examining the current direction of prices.
 

 (CLEAR)
 (GRIDFIELD "Ticker" "STRING" "7")
 (GRIDFIELD "Name" "STRING" "15")
 (GRIDFIELD "LastClose" "STRING" "10")
 (GRIDFIELD "TRsV_previous" "STRING" "10")
 (GRIDFIELD "TRsV_latest" "STRING" "10")
 (GRIDFIELD "TRsV_ratio" "STRING" "10")
 # Load the first company in the worksheet
 (SOURCE "WORKING_GROUP")
 (SET I 0)
 (SET STATUS (LOADFIRST))
 (GOTO %ERROR (NE STATUS 0))
 %AGAIN: (SET I (ADD I 1))
 (SET CLOSE (GETVECTOR (CURRENT) "CLOSE"))
 (SET LOW    (GETVECTOR (CURRENT) "LOW"))
 (SET HIGH   (GETVECTOR (CURRENT) "HIGH"))
 (SET VOLUME (GETVECTOR (CURRENT) "VOLUME"))
 (GOTO %NEXT (LE (VSIZE CLOSE) 10))
 (SET LASTDATE (LASTDATE))
 (GOTO %NEXT (BADDATA CLOSE LASTDATE))
 
 (SET CLOSE_0 (GETDOUBLE "LastClose"))
 # Get the figures needed for the latest TRsV value
 (SET VOLUME_0 (GETDOUBLE "LastVolume"))
 (SET HIGH_0 (GETDOUBLE "LastHigh"))
 (SET LOW_0 (GETDOUBLE "LastLow"))
 (SET C1 (VSIZE CLOSE))
 (SET C1 (SUB C1 2))
 (SET CLOSE_1 (VGET CLOSE C1))
 (SET TR0-1 (ABS (SUB HIGH_0 LOW_0)))
 (SET TR0-2 (ABS (SUB HIGH_0 CLOSE_1)))
 (SET TR0-3 (ABS (SUB LOW_0 CLOSE_1)))
 # The latest True Range value
 (SET TR_0 (MAX (MAX TR0-1 TR0-2) TR0-3))
 # The latest TRsV value
 (SET TRsV_0 (DIV VOLUME_0 TR_0))
 
 # Get the figures needed for the previous TRsV value
 (SET V1 (VSIZE VOLUME))
 (SET V1 (SUB V1 2))
 (SET VOLUME_1 (VGET VOLUME V1))
 (SET H1 (VSIZE HIGH))
 (SET H1 (SUB H1 2))
 (SET HIGH_1 (VGET HIGH H1))
 (SET L1 (VSIZE LOW))
 (SET L1 (SUB L1 2))
 (SET LOW_1 (VGET LOW L1))
 (SET C2 (VSIZE CLOSE))
 (SET C2 (SUB C2 3))
 (SET CLOSE_2 (VGET CLOSE C2))
 (SET TR1-1 (ABS (SUB HIGH_1 LOW_1)))
 (SET TR1-2 (ABS (SUB HIGH_1 CLOSE_2)))
 (SET TR1-3 (ABS (SUB LOW_1 CLOSE_2)))
 # The previous True Range value
 (SET TR_1 (MAX (MAX TR1-1 TR1-2) TR1-3))
 # The previous TRsV value
 (SET TRsV_1 (DIV VOLUME_1 TR_1))
 # Calculate the ratio of the two TRsV values
 (SET TRsVratio (DIV TRsV_0 TRsV_1))
 # Skip current company if ratio is not greater than 1.5
 (GOTO %TAG (GT TRsVratio 1.5))
 (GOTO %NEXT (LE TRsVratio 1.5))
 %TAG:
 (SET TICKER (CURRENT))
 (GRID TICKER "Name" (GETSTRING "NAME"))
 (GRID TICKER "LastClose" (DOUBL2STR CLOSE_0 "%.3lf"))
 (GRID TICKER "TRsV_previous" (DOUBL2STR TRsV_1 "%.3lf"))
 (GRID TICKER "TRsV_latest" (DOUBL2STR TRsV_0 "%.3lf"))
 (GRID TICKER "TRsV_ratio" (DOUBL2STR TRsVratio "%.2lf"))
 
 # Exit the program if user clicks on the ‘Cancel' button
 (GOTO %EXIT (ESCAPE))
 
 %NEXT:
 (SET STATUS (LOADNEXT))
 (GOTO %AGAIN (EQ STATUS 0))
 
 %ERROR: (MESSAGE "An error has occurred - Unable to continue")
 %EXIT: (EXIT STATUS)

--StockWiz
support@stockwiz.com


GO BACK


ASPEN GRAPHICS: TRUE RANGE SPECIFIED VOLUME

Vadin Gimelfarb's article, "Using Volume To Detect Shifts In Power," discusses the true range specified volume (TRsV) and also refers to the balance of market power (BMP) bull and bear indicators from the October 2003 issue of STOCKS & COMMODITIES.

The formulas for these indicators are easy to implement in Aspen Graphics and are shown here in Aspen Graphics' formula language. We have also included a formula for an overlay that will produce an arrow when the TRsV is more than 1.5 times greater than the previous TRsV value (Figure 21). The candlestick patterns shown in Figure 22 come ready to use in Aspen Graphics.

FIGURE 21: ASPEN GRAPHICS, TRsV ON A BAR CHART. This sample Aspen chart shows the TRsV on Newmont Mining Corp., along with the bull power indicator in the lower pane.  An overlay produces arrows when the TRsV is more than 1.5 times greater than the previous TRsV value.

FIGURE 22: ASPEN GRAPHICS, TRsV ON A CANDLESTICK CHART. This sample candlestick chart shows the TRsV on McDonald's Corp., along with the bull power indicator in the lower pane.
 


All of the indicators and charts for this month's Traders' Tips are available at our website, www.AspenRes.com, in the Traders' Tips section.
 

--------

TRsV(series)=$1.volume/$1.trange
--------

TRsV_O1(input)=begin
retval=nonum
if  ($1.volume[1]/$1.trange[1])*(1.5)<$1.volume/$1.trange and Bull_Power($1)>Bear_Power($1)
 then retval='TRsV  ‘|clr_green|fsmall|arrow|vertical
if  ($1.volume[1]/$1.trange[1])*(1.5)<$1.volume/$1.trange and Bear_Power($1)>Bull_Power($1)
 then retval='TRsV  ‘|clr_red|fsmall|arrow|below|vertical
retval
end
--------

Bear_Power(series,Periods=2)=begin
last=$1.open-$1.close
if  $1.open<$1.close then  last=0
retval=savg((($1.open-$1.low)+($1.high-$1.close)+last)/3,Periods)
retval
end
--------

Bull_Power(series,Periods=2)=begin
last=$1.close-$1.open
if  $1.open>$1.close then  last=0
retval=savg((($1.high-$1.open)+($1.close-$1.low)+last)/3,periods)
retval
end
-- Keli Harrison
Aspen Research Group
support@aspenres.com
www.aspenresearch.com


GO BACK


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


Return to Novmeber 2004 Contents