Volatility Trail [BOSWaves]Volatility Trail - Hull-Anchored ATR Trail with Gradient Cloud Radiation and Multi-Mode Candle Scoring
Overview
Volatility Trail is a Hull-anchored trend trailing system that constructs an ATR-scaled ratcheting trail from a Hull Moving Average baseline, where trend state, gradient cloud geometry, and candle coloring intensity are driven by the relationship between price and the adaptive trail rather than by fixed thresholds or static band crossovers.
Instead of relying on conventional moving average crossovers or symmetric bands, trend state is determined by a one-directional ratcheting trail that advances in the trend direction and locks in progress, only flipping when price closes through the trail level in the opposing direction. The trail distance from the Hull baseline scales with ATR, ensuring the ratchet respects current volatility conditions rather than applying a fixed distance regardless of market behavior.
This creates a trailing trend framework that combines a responsive Hull baseline with a volatility-calibrated ratchet mechanism, a radiating four-layer gradient cloud that visually maps the space between trail and price, and a configurable candle coloring system that scores each bar by distance from the trail, trail acceleration, or both, producing a chart where candle brightness communicates conviction intensity rather than merely indicating direction.
Price is therefore evaluated not just for its position relative to the trail but for how far it has extended from it and how fast the trail itself is advancing, providing a multi-dimensional conviction reading through the visual layers of the indicator.
Conceptual Framework
Volatility Trail is founded on the principle that a trailing trend system should do three things simultaneously: define trend state through a ratcheting mechanism that locks in directional progress, communicate the spatial relationship between price and the trail through a graduated visual field, and score candle conviction based on measurable characteristics of that relationship rather than applying uniform coloring regardless of momentum state.
Traditional trailing indicators provide a line that defines trend direction but offer no framework for understanding how convincingly price is separated from that line or whether the trail itself is accelerating. This framework adds those dimensions through the gradient cloud and candle scoring systems, transforming a single trail line into a complete visual conviction map that reveals both where price is relative to the trail and the dynamic quality of the separation between them.
Three core principles guide the design:
The trail should ratchet in the trend direction using ATR-scaled distance from a Hull baseline, locking in progress and only reversing when price demonstrates a genuine closing breach rather than a temporary excursion.
The space between the trail and price should be visualized as a graduated gradient field with multiple opacity layers that radiates from the trail toward price, communicating proximity and separation depth visually rather than numerically.
Candle coloring should reflect measurable conviction characteristics through configurable scoring modes, dimming bars with weak conviction and brightening bars with strong distance or acceleration readings to encode momentum quality into the candlestick display.
This shifts trailing trend analysis from single-line direction tracking into a multi-layer conviction visualization where the trail, cloud, and candles collectively communicate trend state, spatial conviction, and momentum quality simultaneously.
Theoretical Foundation
The indicator combines Hull Moving Average baseline construction, ATR-scaled ratcheting trail mechanics, four-layer gradient cloud construction using proportional gap interpolation, and a dual-mode candle scoring system based on distance normalization and trail acceleration measurement.
The Hull Moving Average provides a low-lag directional baseline that reduces the smoothing delay of standard moving averages while maintaining noise resistance. The trail ratchets by advancing the lower band as a minimum during uptrends and the upper band as a maximum during downtrends, preventing the trail from retreating against price and locking in each bar's progress. The gradient cloud divides the gap between trail and price into four proportionally spaced bands at 20, 40, 65, and 85 percent of the total gap, filling each interval with progressively increasing transparency to create a radiating visual field. Candle scoring normalizes either distance from trail or trail advancement speed against ATR, applies a power transformation to suppress weak readings, and maps the result to a gradient between a neutral dim color and the full trend color.
Four internal systems operate in tandem:
Hull ATR Trail Engine : Calculates the Hull MA baseline and derives upper and lower ATR-scaled bands, maintaining a ratcheting trail that advances with the trend and flips to the opposing band only when price closes through the current trail level.
Gradient Cloud System : Computes four proportional interpolation points between the smoothed trail and price, plots invisible bands at each point, and fills the intervals with opacity-graduated fills that intensify near the trail and fade toward price, producing a radiating cloud effect.
Candle Scoring Engine : Measures distance from trail normalized by ATR and trail advancement speed normalized by ATR fraction, applies a power exponent to crush weak scores, and maps the resulting score to a gradient from a dim neutral color to the full trend color through configurable distance, acceleration, or combined scoring modes.
Retest Detection System : Monitors price proximity to the trail after the signal buffer period, triggering retest diamonds when price approaches within an ATR-fraction zone of the trail without crossing it, with per-side cooldown enforcement between consecutive signals.
This design allows the trail to provide clean directional state through ratcheting mechanics while the cloud and candle systems layer spatial and momentum conviction context onto the same chart space.
How It Works
Volatility Trail evaluates price through a sequence of trail-aware and conviction-scoring processes:
Source Selection : The price source used for Hull calculation and trail comparison is selected from Close, HL2, HLC3, or OHLC4, allowing the baseline to be anchored to the most appropriate price representation for the target instrument.
Hull Baseline Calculation : The Hull Moving Average is calculated over the configured length from the selected source, providing a low-lag directional reference that minimises the lag penalty of standard moving averages.
ATR Band Derivation : Upper and lower bands are calculated by adding and subtracting ATR multiplied by the configured factor from the Hull baseline, producing volatility-scaled boundaries that adapt to changing market conditions.
Trail Ratcheting : During an uptrend the trail advances as the maximum of the lower band and the prior trail, preventing retreat against price. During a downtrend it advances as the minimum of the upper band and the prior trail. When price closes through the current trail the trend flips and the trail resets to the opposing band.
Trail Display Smoothing : An EMA smoothing pass over the configurable length is applied to the trail for display purposes, producing a visually cleaner line while signals continue to fire from the raw unsmoothed trail.
Gradient Cloud Construction : The gap between the smoothed trail and close is calculated and four interpolation points are derived at proportional fractions of that gap. Each interval between adjacent points is filled with a directional color at progressively increasing transparency, producing a graduated cloud that radiates from the trail outward toward price.
Distance Scoring : The absolute distance between close and the smoothed trail is divided by three times ATR to produce a normalized 0-1 distance score, measuring how far price has extended from the trail relative to recent volatility.
Acceleration Scoring : Trail advancement speed is measured as the absolute change in trail position over the acceleration lookback, normalized by a fraction of ATR, producing a 0-1 score reflecting how quickly the trail is currently advancing.
Score Combination and Power Transform : Depending on the selected candle mode, the distance score, acceleration score, or their maximum is selected, then raised to the power of 2.5 to suppress low-conviction readings and concentrate brightness at genuinely strong bars.
Candle Color Mapping : The transformed score maps from a fixed dim neutral color at zero to the full trend color at one, producing candles that are nearly invisible during low-conviction conditions and fully saturated during strong extension or acceleration events.
Retest Diamond Detection : After the signal buffer period from the most recent flip, price approaching within a fraction of ATR of the trail without crossing it triggers a directional retest diamond, with per-side cooldown enforced between consecutive signals.
Together, these elements form a continuously updating trail system where ratcheting mechanics define direction, gradient cloud layers map spatial conviction, and candle scoring communicates momentum quality across every bar of the trend.
Interpretation
Volatility Trail should be interpreted as a ratcheting trend system with radiating conviction geometry and multi-mode candle intensity scoring:
Bullish Trend State (Green) : Active when the trail has ratcheted below price and price has not closed below it, with the gradient cloud radiating upward from the trail toward the current bar.
Bearish Trend State (Red) : Active when the trail has ratcheted above price and price has not closed above it, with the gradient cloud radiating downward from the trail toward the current bar.
Trail Line : The smoothed ratcheting trail provides the primary directional boundary, advancing with the trend and serving as the structural invalidation level for the current directional state.
Gradient Cloud : Four fills between the trail and price create a radiating opacity field that intensifies near the trail and fades toward price, visually encoding the spatial relationship between the ratchet boundary and current price action. A thick, prominent cloud indicates substantial separation, while a thin cloud suggests price is close to the trail and near potential retest territory.
Distance Mode Candles : Candle brightness reflects how far price has extended from the trail relative to ATR. Bright candles indicate substantial separation, dim candles indicate proximity to the trail.
Acceleration Mode Candles : Candle brightness reflects how fast the trail itself is advancing. Bright candles indicate the trail is moving quickly with the trend, dim candles indicate the trail is stalling.
Both Mode Candles : Candle brightness reflects the maximum of distance and acceleration scores, brightening when either strong extension or strong trail advancement is present.
▲ Buy Signals : Green triangles mark upward trail flips where trend has switched from bearish to bullish and the trail has reset to the lower ATR band.
▼ Sell Signals : Red triangles mark downward trail flips where trend has switched from bullish to bearish and the trail has reset to the upper ATR band.
◆ Retest Diamonds : Small diamonds plotted below bars during bullish retests and above bars during bearish retests when price approaches within the retest zone of the trail after the signal buffer period, identifying potential continuation interaction points with the trailing boundary.
Trail position, cloud depth, candle brightness, and retest diamond placement collectively provide more conviction information than trend direction alone.
Signal Logic & Visual Cues
Volatility Trail presents two primary trail flip signals alongside continuous retest zone monitoring:
Buy Signal (▲) : Green triangle appears when the trail ratchet flips from bearish to bullish, indicating price has closed above the upper ATR band and the trail has reset to the lower band to begin a new bullish ratchet cycle.
Sell Signal (▼) : Red triangle appears when the trail ratchet flips from bullish to bearish, indicating price has closed below the lower ATR band and the trail has reset to the upper band to begin a new bearish ratchet cycle.
Retest diamond detection provides continuous secondary monitoring, marking proximity to the trail after the signal buffer period with independent per-side cooldown enforcement, identifying potential continuation setups at the ratchet boundary throughout the established trend.
Alert generation covers bullish and bearish trail flips and both bullish and bearish retest events for systematic trend monitoring workflows.
Strategy Integration
Volatility Trail fits within volatility-adaptive trailing and momentum conviction approaches:
Trail Flip Entries : Use trail flip signals as primary trend initiation triggers where price has closed through the ATR-scaled boundary and the ratchet has reset in the new direction, with the newly positioned trail providing an immediate structural invalidation reference.
Candle Mode Selection for Instrument Type : Use Distance mode on instruments where price extension from the trail is the primary conviction indicator, Acceleration mode on instruments where trail advancement speed is more consistent, and Both mode for instruments where either characteristic can signal high conviction depending on market phase.
Cloud Depth Assessment : Use gradient cloud depth as a real-time spatial conviction reading. A deep cloud with multiple visible layers indicates substantial separation and trend momentum. A thin cloud with minimal fill depth indicates price is compressing toward the trail and a retest is increasingly probable.
Retest Diamond Re-entry : Use retest diamonds as lower-risk continuation entry references within established trends, entering in the trend direction when price approaches the trail boundary after the signal buffer period rather than chasing extended price action far from the trail.
ATR Factor Calibration : Adjust the ATR factor to match the instrument's typical volatility behavior at the target timeframe, using higher factors for instruments requiring more room between price and trail and lower factors for tighter ratchet tracking.
Multi-Timeframe Trail Alignment : Apply higher-timeframe trail direction as a bias filter, engaging with lower-timeframe flip signals and retest diamonds only when they align with the established higher-timeframe ratchet direction.
Technical Implementation Details
Core Engine : Hull Moving Average baseline with configurable source and ATR-scaled ratcheting trail mechanics
Trail Logic : One-directional ratchet advancing as band maximum or minimum in respective trend directions with flip on close breach
Gradient Cloud : Four proportional gap interpolation points with interval fills at graduated transparency levels radiating from trail toward price
Candle Scoring : ATR-normalized distance and acceleration scoring with power transform and gradient mapping to dim-to-trend-color range
Retest System : ATR-fraction proximity zone detection with signal buffer and independent per-side cooldown enforcement
Visualization : Smoothed trail line, four-layer gradient cloud fills, flip signal labels, retest diamond markers, and multi-mode intensity-scored candle coloring
Signal Logic : Raw trail flip detection with smoothing applied to display only, preserving signal timing accuracy
Performance Profile : Optimized for real-time execution across all timeframes with stateful trail variable maintaining ratchet progress between bars
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Intraday trail tracking for scalping with shorter Hull length and tighter ATR factor for fast ratchet response to intraday momentum shifts
15 - 60 min : Session-level trend identification with balanced Hull length and moderate ATR factor for reliable directional framing across typical session moves
4H - Daily : Swing-level trailing with longer Hull length and higher ATR factor for sustained ratchet persistence across multi-session directional moves
Suggested Baseline Configuration:
Hull Length : 72
ATR Length : 9
ATR Factor : 1.7
Source : Close
Trail Smoothing : 4
Show Gradient Cloud : Enabled
Color Candles : Enabled
Candle Color Mode : Distance
Show Buy/Sell : Enabled
Retest Diamonds : Enabled
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, Hull responsiveness at the target timeframe, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Trail flips too frequently : Increase ATR Factor to widen the distance between the Hull baseline and the trail boundary, requiring more significant price displacement before a flip is registered.
Trail flips too slowly : Decrease ATR Factor toward 0.5 for a tighter trail that responds faster to directional changes, or decrease Hull Length for a more reactive baseline.
Hull baseline too laggy : Decrease Hull Length toward 20 for a faster baseline that captures directional shifts earlier, accepting increased sensitivity to short-term price fluctuations.
Hull baseline too reactive : Increase Hull Length for a smoother baseline that filters minor oscillations and produces a more stable trail ratchet with fewer noise-driven flips.
Candles too uniformly dim : Switch to Acceleration mode if the instrument's trail advancement speed is more variable than its price extension, or reduce ATR Factor so distance scores normalize against a tighter trail range.
Too many retest diamonds : Increase Retest Cooldown to enforce greater bar separation between consecutive diamond markers, or increase Signal Buffer to delay retest detection further from each flip event.
Retest diamonds not firing : The retest zone is sized as a fraction of ATR multiplied by the ATR Factor. On instruments with very consistent trail distance this zone may be narrow. Increasing ATR Factor slightly widens the retest detection zone relative to the trail boundary.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets with sustained directional moves where the Hull baseline advances consistently and the trail ratchets without frequent resets, producing deep gradient clouds and bright high-conviction candles throughout the move
Instruments with consistent ATR behavior where the volatility-scaled trail distance produces reliable flip signals without excessive noise-driven reversals
Momentum continuation strategies that benefit from the retest diamond system identifying pullback interactions with the trail boundary as lower-risk continuation entry points
Multi-mode candle scoring approaches where distance or acceleration scoring provides additional conviction context that supplements the directional trail signal
Reduced Effectiveness:
Choppy, low-momentum markets where price oscillates near the Hull baseline, causing frequent trail flips and preventing the ratchet from establishing meaningful directional progress
Extremely volatile instruments where ATR spikes produce wide trail distances that delay flip detection relative to the actual structural change in price direction
Consolidation environments where the Hull baseline moves sideways and the trail ratchet stalls, producing minimal cloud depth and uniformly dim candles without directional conviction scoring
News-driven or gap-heavy markets where instantaneous price displacements trigger trail flips that immediately reverse before the ratchet can establish sustained directional progress
Mean-reversion dominant conditions where trail flips occur rapidly in alternating directions without the sustained follow-through required for gradient cloud development or sequential retest patterns
Integration Guidelines
Confluence : Combine with BOSWaves structural tools, order flow analysis, or momentum oscillators to validate trail flip signals with broader analytical context before committing to directional positions
Cloud Depth Monitoring : Track gradient cloud depth evolution throughout the trend as a spatial conviction indicator. Progressively deepening cloud layers suggest sustained separation and trend health while thinning cloud depth warns of price compression toward the trail and potential retest or flip conditions.
Candle Mode Selection : Match the candle scoring mode to the instrument's typical conviction expression. Instruments that show conviction through large extension moves favor Distance mode; instruments that show conviction through accelerating trail advancement favor Acceleration mode; instruments that express conviction through either mechanism favor Both mode.
Ratchet Progress Awareness : Recognize that the trail only advances and never retreats against price within a trend. Rapid trail advancement reflected in bright Acceleration mode candles indicates strong directional follow-through, while a stalling trail with minimal advancement suggests momentum is flattening before potential reversal.
State Discipline : Maintain directional bias aligned with the current trail trend state until a confirmed closing breach of the trail triggers a flip. Retest diamonds and cloud thinning within an established trend represent continuation context rather than reversal signals and should not override the ratchet-defined directional state.
Disclaimer
Volatility Trail is a professional-grade Hull-anchored trend trailing and conviction visualization tool. It uses ATR-scaled ratcheting trail mechanics with gradient cloud construction and multi-mode candle scoring but does not predict future price movements. Results depend on market conditions, instrument volatility characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates order flow context, structural analysis, and comprehensive risk management.
Pine Script® indicator






















