Volatility Hull Ribbon [BackQuant]Volatility Hull Ribbon
Overview
Volatility Hull Ribbon is a trend-following overlay built from a Hull-style moving average that replaces traditional volume weighting with volatility weighting . Instead of weighting price by traded volume, this indicator weights price by the absolute True Range of each bar, meaning bars with larger range expansion have more influence on the final trend estimate.
The goal is to create a smoother but responsive trend line that pays more attention to bars where the market actually moved with force. It then plots this volatility-weighted Hull structure as either a clean line or a ribbon-style band, with gradient fill, candle coloring, and long/short flip markers.
At a high level, the indicator does three things:
Builds a volatility-weighted moving average using True Range as the weighting source.
Applies Hull-style lag reduction to produce a faster trend-following curve.
Visualizes trend direction using slope, ribbon fill, candles, and flip signals.
Core idea
Most moving averages treat each bar equally or weight only by time. That means a quiet candle and a high-range expansion candle can have similar influence depending on the MA type.
Volatility Hull Ribbon takes a different approach:
Bars with larger True Range are treated as more important.
Bars with smaller True Range have less influence.
Recent bars are also weighted more heavily than older bars.
This creates a trend estimate that responds more strongly when the market expands, while remaining smoother during lower-energy movement.
What “volatility-weighted” means here
The custom weighting function uses:
Price source
Absolute True Range
A decreasing time weight
For each bar inside the lookback:
Weighted price contribution = source * abs(True Range ) * recency weight
Weight contribution = abs(True Range ) * recency weight
Then:
Volatility-weighted average = weighted price sum / weighted True Range sum
So price movement on wide-range bars matters more than price movement on quiet bars.
Why True Range is used
True Range captures more than just high-low movement. It accounts for gaps and previous close displacement. This makes it a broader volatility proxy than simple candle range.
Using True Range as the weight means the filter gives more importance to bars where:
Range expanded,
Price displaced aggressively,
Volatility increased,
Market participation likely intensified.
This is useful because strong trend moves often occur during volatility expansion, not during quiet drift.
Hull-style construction
The indicator then applies a Hull-style transformation to the volatility-weighted average.
The structure is:
VWHMA = VWMA_TR( 2 * VWMA_TR(src, len / 2) - VWMA_TR(src, len), sqrt(len) )
Where VWMA_TR means the custom True-Range-weighted moving average.
This follows the same logic as the classic Hull Moving Average:
Use a faster half-length average.
Use a slower full-length average.
Subtract the lagging component.
Smooth the result with sqrt(length).
The difference is that every smoothing step is volatility-weighted instead of standard weighted-average based.
Why this matters
A classic Hull Moving Average is already designed to reduce lag. This version modifies the internal weighting so the curve becomes more sensitive to volatility-backed price movement .
That means:
Large expansion bars can pull the filter faster.
Weak low-range chop has less effect.
Trend changes during strong movement can be reflected more clearly.
Trend detection
Trend direction is based on the slope of the VWHMA:
Bullish when VWHMA > VWHMA
Bearish when VWHMA < VWHMA
This is a simple but effective regime definition:
Rising volatility-weighted Hull = bullish trend pressure.
Falling volatility-weighted Hull = bearish trend pressure.
The script uses this slope state to color:
The main line,
The ribbon fill,
Optional candles,
Signal markers.
Ribbon mode
When “Plot as Band?” is enabled, the script creates a second line:
onebar_off = WMA(VWHMA , 10)
This is a delayed and smoothed version of the VWHMA. The area between the current VWHMA and this offset line becomes the ribbon.
Interpretation:
Ribbon expansion shows separation between current trend structure and its delayed reference.
Ribbon compression shows trend slowing or flattening.
A clean flip in the ribbon often coincides with trend transition.
The ribbon is not a volatility band. It is a trend displacement ribbon built from the difference between the current VWHMA and its delayed smoothed version.
Gradient fill logic
The fill is directional:
If VWHMA is above the offset line, fill intensity is stronger near the VWHMA and fades toward the offset.
If VWHMA is below the offset line, the gradient reverses.
This creates a cleaner visual than a flat fill because it emphasizes the active side of the ribbon.
In practice:
Strong bright ribbon = trend line leading the delayed reference.
Faded/narrow ribbon = weaker separation.
Ribbon reversal = trend pressure has shifted.
Signal logic
Signals are generated when the VWHMA slope changes direction:
Long signal: crossover(VWHMA, VWHMA )
Short signal: crossunder(VWHMA, VWHMA )
This means:
A long signal prints when the current VWHMA turns upward relative to the previous value.
A short signal prints when the current VWHMA turns downward.
These are slope-flip signals, not price crossover signals.
Important interpretation
A signal does not mean “buy blindly” or “sell blindly.” It means the volatility-weighted trend estimate has changed direction. The quality of the signal depends on:
Market structure,
Higher timeframe trend,
Volatility conditions,
Whether the ribbon is expanding or compressing.
Candle coloring
When enabled, candles are painted according to the VWHMA slope:
Bullish slope = long color.
Bearish slope = short color.
This makes the indicator easier to read as a regime overlay. You can quickly see when the market is consistently aligned with the volatility-weighted trend.
How to use it
1) Trend filter
Use the VWHMA color as a bias filter:
Only favor longs when the VWHMA is rising.
Only favor shorts when the VWHMA is falling.
2) Trend transition tool
Slope flips can identify early trend shifts:
Long marker = VWHMA has turned upward.
Short marker = VWHMA has turned downward.
Because the filter is Hull-style and volatility-weighted, it can react faster than slower trend filters while still suppressing some low-range noise.
3) Ribbon strength reading
The ribbon gives additional context:
Expanding ribbon = stronger separation and cleaner trend pressure.
Contracting ribbon = momentum weakening.
Ribbon flattening = chop or transition risk.
4) Pullback structure
In strong trends, price often respects the VWHMA or ribbon area:
Bull regime: pullbacks into the ribbon can act as support.
Bear regime: rallies into the ribbon can act as resistance.
5) Volatility-backed trend confirmation
Because large True Range bars influence the calculation more, this tool is useful for identifying whether trend changes are being supported by actual range expansion.
If price moves but the VWHMA does not respond strongly, the move may lack volatility-backed confirmation.
Input guide
Price Source
Defines the input series used for the calculation. Close is standard, but hl2, hlc3, or ohlc4 can be used for smoother structural behavior.
Lookback Period
Controls the smoothing length:
Lower values = faster response, more signals, more noise.
Higher values = smoother trend, fewer flips, more lag.
Plot as Band
Enables the ribbon view using the delayed smoothed VWHMA reference.
Line Width
Controls the main line thickness when not relying heavily on band mode.
Show Trend Candles
Paints candles by current trend state.
Show Signals
Toggles the long/short slope-flip markers.
Strengths
Uses volatility-weighted smoothing instead of equal weighting.
Combines volatility sensitivity with Hull-style lag reduction.
Clean ribbon visualization for trend displacement.
Simple slope-based regime interpretation.
Works well as a trend overlay or bias filter.
Limitations
Slope flips can still whipsaw in sideways markets.
Large wick bars can influence the filter strongly because True Range is used as weight.
It does not measure volume, despite using a VWMA-style internal function.
It is a trend tool, not a complete trading system.
Best use case
Volatility Hull Ribbon works best when used as a visual trend structure layer:
Use color for bias.
Use ribbon expansion/compression for strength.
Use slope flips for regime transitions.
Use price interaction with the ribbon for pullback context.
Summary
Volatility Hull Ribbon is a Hull-style trend overlay that replaces traditional weighting with True Range weighting, making the moving average more responsive to volatility-backed price movement. It builds a low-lag volatility-weighted Hull curve, compares it to a delayed smoothed reference to form a ribbon, and uses slope changes to define trend direction and signals. The result is a clean, responsive trend ribbon that highlights when volatility-backed trend pressure is rising, fading, or reversing.
Pine Script® indicator






















