The Vertical Horizontal Filter (VHF) can tell you whether a market is going through a trending or congestion phase, and whether you should use trend-following indicators if the markets are trending or congestion-phase indicators if markets are in a trading range.
VHF = (Highest Close (n) - Lowest Close (n)) / (Sum of absolute value of the one-day price change for the range (n))
The standard VHF works with a 28-days parameter : n = 28
Finance::GeniusTrader::Indicators::VHF->new() Finance::GeniusTrader::Indicators::VHF->new([50])
http://www.equis.com/free/taaz/verthorizfilter.html http://www.finance-net.com/apprendre/techniques/vhf.phtml
To install Finance::GeniusTrader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::GeniusTrader
CPAN shell
perl -MCPAN -e shell install Finance::GeniusTrader
For more information on module installation, please visit the detailed CPAN module installation guide.