All indicators

Historical Volatility Percentile: Price and Volume

Jul 28, 2020

Static chart image
Volume BasedSignalsMoving AveragesVolatility

The Historical Volatility Percentile: Price and Volume indicator provides a comprehensive measure of asset volatility by analyzing fluctuations in both price and volume relative to historical averages. It helps traders identify periods of extreme risk, potential trend exhaustion, or impending volatility breakouts by normalizing these fluctuations into a percentile format.

Usage

The indicator displays the combined volatility of price and volume as a histogram. Users can observe the intensity of market movement through the height and color of the columns.

  • Extreme Volatility: High values (typically above 70-90) indicate that current price and volume fluctuations are significantly higher than the historical norm, often signaling potential trend reversals or blow-off tops/bottoms.
  • Low Volatility: Values below 30 suggest a period of consolidation or "quiet" market behavior, which often precedes a significant expansion in volatility.
  • Combined Signals: By toggling both Price and Volume inputs, traders can see if a price move is backed by significant volume volatility. If both reach extreme levels, the indicator plots triangle shapes (up or down) to signal potential exhaustion or breakout points.
  • Moving Average: The included SMA helps smooth the volatility readings, allowing users to identify the underlying trend of market activity.

Details

The script calculates Historical Volatility (HV) by measuring the standard deviation of logarithmic returns over a specified period, then annualizing it using a lookback length. This HV value is then transformed into a Historical Volatility Percentile (HVP), which ranks the current volatility against all values within the defined lookback window.

The indicator extends the traditional HVP concept by applying the same logic to logarithmic volume. By averaging the price-based HVP and the volume-based HVP, the tool provides a "Volume-Weighted" view of volatility that distinguishes between high-activity price moves and low-liquidity drifts.

Settings

  • Source: The price data used for the primary volatility calculation (default is Close).
  • Length: The period over which the standard deviation of returns is calculated.
  • Lookback Length: The window size used to determine the percentile rank and annualization factor.
  • Average Length: The period for the optional SMA plotted over the histogram.
  • Percent Rank Limit: Defines the threshold for the high/low percentile alerts and shapes (e.g., top/bottom 5%).
  • Include Source: Toggles the price-based volatility component.
  • Include Volume: Toggles the volume-based volatility component.
  • Include Percent Rank: Enables or disables the visual triangle shapes based on percent rank limits.
  • Include SMA: Toggles the visibility of the smoothing Simple Moving Average.

FAQ

How do I interpret the histogram colors?

The colors transition from blue (low volatility) to grey (neutral) to varying shades of red (high volatility). A bright red column typically indicates the volatility is in its highest historical bracket (above 90%).

Can I use this for identifying trend direction?

No, the Historical Volatility Percentile: Price and Volume indicator is non-directional. It measures the magnitude of fluctuations rather than the direction. A high reading can occur during both aggressive rallies and sharp sell-offs.

How can I access Historical Volatility Percentile: Price and Volume?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.