QuantStudio Financial Data Analysis and Trading Framework

VHF Class

Vertical Horizontal Filter (VHF)

For a list of all members of this type, see VHF Members.

System.Object
   RQuant.Indicator.TTimeArray
      RQuant.Indicator.TDoubleArray
         RQuant.Indicator.TIndicator
            RQuant.Indicator.VHF

[Visual Basic]
Public Class VHF
    Inherits TIndicator
[C#]
public class VHF : TIndicator

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

The Vertical Horizontal Filter determines whether prices are in a trending phase or a congestion phase. The VHF was first presented by Adam White in an article published in the August, 1991 issue of Futures Magazine.

Probably the biggest dilemma in technical analysis is determining if prices are trending or are in a trading-range. Trend-following indicators such as the MACD and moving averages are excellent in trending markets, but they usually generate multiple conflicting trades during trading-range (or "congestion") periods. On the other hand, oscillators such as the RSI and Stochastics work well when prices fluctuate within a trading range, but they almost always close positions prematurely during trending markets. The VHF indicator attempts to determine the "trendiness" of prices to help you decide which indicators to use.

There are three ways to interpret the VHF indicator: 1. You can use the VHF values themselves to determine the degree that prices are trending. The higher the VHF, the higher the degree of trending and the more you should be using trend-following indicators. 2. You can use the direction of the VHF to determine whether a trending or congestion phase is developing. A rising VHF indicates a developing trend; a falling VHF indicates that prices may be entering a congestion phase. 3. You can use the VHF as a contrarian indicator. Expect congestion periods to follow high VHF values; expect prices to trend following low VHF values.

This indicator is described in more details in the Steve Achelis' book "Technical Analysis from A to Z".

Formula:

Example

TDataManager.cd("Demo");

TDailyArray Daily1 = TDataManager.GetStock("YHOO").DailyArray;

DateTime Date1 = DateTime.Parse("1999/02/08"); 
DateTime Date2 = DateTime.Parse("2000/12/29"); 

TDailyArray Daily = Daily1.Clone(Date1, Date2);

TCanvas Canvas = new TCanvas("Canvas","VHF DEMO",600,400);

VHF VHF = new VHF(Daily, 14);

Canvas.cd(1);
Daily.Draw("c");

Canvas.cd(2);
VHF.Draw();    

Requirements

Namespace: RQuant.Indicator

Assembly: RQuant.Indicator (in RQuant.Indicator.dll)

See Also

VHF Members | RQuant.Indicator Namespace