Vertical Horizontal Filter
The Vertical Horizontal Filter (VHF) identifies whether a market is in a trending or a choppy movement phase.
The VHF indicator is most commonly used as an indicator of market volatility. It is also frequently used as a component to other technical indicators.
set BUY =VHF(CLOSE, 21) < 0.2