Log in to see Cloud of Tags

Wealth-Lab Wiki

Syntax

public static VHF Series(DataSeries source, int period) public VHF(DataSeries source, int period, string description)

Parameter Description

source Price series
period Indicator calculation period

Description

The Vertical Horizontal Filter was introduced by Adam White in 1991 and is used to determine if prices are trending or are in a congestion stage. It is calculated by dividing the difference in the sums of highest and lowest values by the sum of the absolute values of daily price differences. Typically a period of 28 is used for VHF.

Interpretation

VHF describes how strongly prices are trending. The higher the VHF value, the stronger the trend.

Example

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Color chart background when prices are trending according to VHF DataSeries vhf = VHF.Series( Close, 28 ); ChartPane VHFPane = CreatePane( 30, true, true ); PlotSeries( VHFPane, vhf, Color.Red, WealthLab.LineStyle.Solid, 1 ); for(int bar = 28; bar < Bars.Count; bar++) { if( vhfbar > 0.4 ) SetBackgroundColor( bar, Color.FromArgb(50,0,100,255) ); } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.