// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("VHF");
pds=9; 
smooth=3;
hcp=HHV(C,pds);
lcp=LLV(C,pds);
mcp=C-Ref(C,-1);
sav=Sum(abs(mcp),pds);  

Vhf=(Hcp-Lcp)/sav;
Plot(EMA(vhf,smooth),"Vertical Horizontal Filter",colorBlue,4); 

Title=WriteIf(Vhf>Ref(Vhf,-1)AND
Ref(Vhf,-1)>Ref(Vhf,-2),EncodeColor(colorGreen)+" VHF is currently
rising.",EncodeColor(colorYellow)+" VHF is Falling."); 
_SECTION_END();