Vertical Horizontal Filter (VHF)

Studies that have been contributed to the community by other users. If you’ve got something useful to share, that’s great!
Laurent
Posts: 159
Joined: 20 Nov 2010
Location: France
Has thanked: 76 times
Been thanked: 32 times

Vertical Horizontal Filter (VHF)

Postby Laurent » 11 Feb 2011

My code for the VHF indicator.

The description can be found here:
http://www.incrediblecharts.com/indicators/vertical_horizontal_filter.php

Code: Select all


// VHF - Vertical Horizontal Filter - Function

Inputs:
   Series ( NumericSeries ),   // Close
   Len ( NumericSimple );                                                 

Variables:
   j ( 0 ),
   Num ( 0 ),
   Denom ( 0 );

Num = Highest(Series, Len) - Lowest(Series, Len);

Denom = 0;
for j = 0 to Len - 1
begin
   Denom = Denom + absvalue(Series[j] - Series[j + 1]);
end;

if Denom <> 0 then
   VHF = Num / Denom
else
   VHF = 0;


Code: Select all

// VHF - Vertical Horizontal Filter - Indicator

Inputs:
        ClosePrice ( Close ),
        Length ( 28 ),
        Displace ( 0 );

Variables:
        MyVHF ( 0 );

MyVHF = VHF(ClosePrice, Length);

Plot1[Displace](MyVHF, "VHF");


;)

Return to “User Contributed Studies and Indicator Library”