Fibonacci Volatility Cloud [JOAT]Fibonacci Volatility Cloud
Introduction
The relationship between price, trend, and volatility is the core equation of technical analysis — and most indicators address only one or two of its variables at a time. Moving averages define trend but ignore volatility structure. Bollinger Bands embed volatility but use static multipliers with no harmonic rationale. The Fibonacci Volatility Cloud addresses all three simultaneously: it defines trend direction through a triple-smoothed adaptive basis, measures volatility through a user-selectable ATR or standard deviation engine, and projects dynamic support and resistance zones using Fibonacci ratios (0.618, 1.0, 1.618, and 2.618) as the band multipliers.
The choice of Fibonacci ratios is not cosmetic. These values appear persistently in the mathematical structure of natural systems and have demonstrated consistent relevance as price reaction zones in financial markets across asset classes. By anchoring the band distances to these ratios rather than arbitrary integers, the cloud levels carry harmonic weight. A touch at the 1.618 extension is not the same as a touch at the 1.5 extension — the former sits at a recognized inflection ratio, and the indicator is designed to treat it as such.
Beyond the band framework, the indicator features a direction-conditional cloud: during bull trends, the lower (support) bands are filled; during bear trends, the upper (resistance) bands are filled. This directional fill logic means the shaded area of the chart always represents the most relevant zone given the current structural bias. An additional triple-smoothed signal line provides momentum context, and a seven-row dashboard tracks all key states simultaneously. Entry signals for both breakout and bounce conditions are included, along with configurable take-profit targets mapped to specific Fibonacci levels.
Core Concepts
1. Triple-Smoothed Basis
The foundation of every calculation in this indicator is a triple-layered EMA applied to the HLC3 midpoint. Applying a single EMA to price introduces lag proportional to the period length. Applying a second EMA to the result further smooths transient noise while preserving directional information. The third application produces a basis line that is highly resistant to single-candle spikes and short-duration noise patterns while remaining responsive to genuine trend development.
basis = ta.ema(ta.ema(ta.ema(hlc3, len), len), len)
Because the triple smoothing applies the same period three times, the effective lag is higher than a single EMA of the same length — but this is intentional. The basis is not meant to hug price; it is meant to define the structural center of gravity around which volatility bands expand. Users should select the period (default: 20) based on the timeframe and the degree of noise filtering desired.
2. Volatility Measurement Engine
Volatility in this indicator is not fixed. Users choose between ATR (Average True Range) and Standard Deviation as the volatility measure. ATR captures range-based volatility and responds to gap behavior and intraday extremes, making it better suited for instruments with frequent gaps or aggressive wick behavior. Standard Deviation measures the statistical dispersion of the price source around its mean, which is more appropriate for instruments with smooth, continuous price action.
vol = volType == "ATR" ? ta.atr(volLen) : ta.stdev(hlc3, volLen)
The selected volatility value is then multiplied by each Fibonacci ratio to establish the four band distances. This means the bands breathe dynamically with the market — contracting during low-volatility consolidation and expanding during high-volatility trending phases.
3. Fibonacci Band Construction
The four bands are constructed by adding and subtracting the Fibonacci-weighted volatility from the basis. Each ratio carries a distinct behavioral expectation. The 0.618 band is the nearest zone — frequently tested during shallow pullbacks. The 1.0 band (equal to raw volatility) is a neutral midpoint. The 1.618 band represents the primary extension zone and is most frequently associated with momentum reversals. The 2.618 band represents extreme extension, typically only reached during impulsive, high-velocity moves.
f1 = 0.618
f2 = 1.0
f3 = 1.618
f4 = 2.618
upperFib1 = basis + vol * f1
upperFib2 = basis + vol * f2
upperFib3 = basis + vol * f3
upperFib4 = basis + vol * f4
lowerFib1 = basis - vol * f1
lowerFib2 = basis - vol * f2
lowerFib3 = basis - vol * f3
lowerFib4 = basis - vol * f4
The gradient fill between the 0.618 and 2.618 bands is rendered using color.from_gradient, creating a visual intensity gradient where proximity to the extreme band is immediately apparent.
4. Non-Repainting Trend State Machine
Trend direction is determined from the basis line's own slope — not from any external indicator or price crossover. If the current basis is above the previous bar's basis, the trend state is 1 (up). If below, the state is -1 (down). If equal (rare on continuous data), the state persists from the prior bar. Crucially, the state variable is declared with `var` and updates only when a directional change is confirmed — making it a true state machine with no look-ahead dependency.
var int trend = 0
trend := basis > basis ? 1 : basis < basis ? -1 : trend
This approach prevents the trend direction from changing retroactively on historical bars when future data is loaded, which is the core cause of repainting in many similar indicators.
5. Direction-Conditional Cloud Fill
During a bull trend, the cloud fills the lower Fibonacci bands (below basis), shading the support zone where price is expected to find demand. During a bear trend, the upper bands (above basis) are filled, shading the resistance zone where selling pressure is expected. This conditional rendering ensures that the visually dominant cloud region always represents the high-probability reaction zone given the current bias.
cloudFillLow1 = trend == 1 ? lowerFib1 : na
cloudFillLow4 = trend == 1 ? lowerFib4 : na
cloudFillHigh1 = trend == -1 ? upperFib1 : na
cloudFillHigh4 = trend == -1 ? upperFib4 : na
6. Proximity Bar Coloring and Signal Line
Bar colors are driven by the normalized distance from the basis to the 2.618 band. As price approaches the outer Fibonacci boundary, bar colors become more saturated — providing an immediate visual cue of extension. Near the basis, bars fade toward transparency. The signal line is a triple-smoothed version of the basis itself at a configurable signal period, with a gradient fill rendered between basis and signal using color.from_gradient to encode momentum direction.
normDist = math.abs(close - basis) / (vol * f4)
barAlpha = math.min(math.round(normDist * 65), 65)
sig = ta.ema(ta.ema(basis, sigLen), sigLen)
7. Entry Signals and Take-Profit Modes
Two entry signal types are provided per direction. Breakout entries fire when the basis crosses above (long) or below (short) the prior bar's basis value — a trend initiation signal based on the basis itself turning directional. Bounce entries fire when price wicks below the basis during a bull trend but closes back above it — a mean-reversion entry at the structural center. Take-profit aggressiveness maps to Fibonacci levels: Low targets the 2.618 band (letting winners run far), Medium targets the 1.0 band, and High targets the 0.618 band (quick, conservative profit-taking).
longEntry = ta.crossover(basis, basis )
longBounce = trend == 1 and low < basis and close > basis
shortEntry = ta.crossunder(basis, basis )
shortBounce = trend == -1 and high > basis and close < basis
Features
Triple-Smoothed Basis: Three sequential EMA applications to HLC3 produce a low-noise structural centerline that resists single-candle spikes.
Switchable Volatility: ATR or Standard Deviation mode allows the volatility engine to be matched to the instrument's price behavior characteristics.
Four Fibonacci Bands: Harmonic multipliers (0.618, 1.0, 1.618, 2.618) produce band distances grounded in natural ratio mathematics.
Non-Repainting State Machine: Trend direction stored in a var variable updates only on slope changes, ensuring historical plots never shift retroactively.
Direction-Conditional Cloud: Lower bands filled in bull trend, upper bands filled in bear trend — the relevant zone is always the visible one.
Gradient Fill: color.from_gradient between 0.618 and 2.618 bands provides depth perception of extension without cluttering the chart.
Proximity Bar Coloring: Distance to outer Fibonacci band drives bar color alpha, making extreme extensions visually prominent.
Triple-Smoothed Signal Line: EMA applied twice to the basis at a separate signal period creates a momentum crossover reference.
Four Signal Types: Long entry, long bounce, short entry, short bounce — covering both trend continuation and mean-reversion approaches.
Configurable TP Tiers: Three aggressiveness modes map take-profit targets to specific Fibonacci bands.
Seven-Row Dashboard: Real-time display of trend, basis value, distance from basis, current Fibonacci zone, volatility type, TP mode, and signal status.
Input Parameters
Basis Settings:
Basis Length: Period for the triple EMA smoothing (default: 20)
Volatility Type: ATR or StDev (default: ATR)
Volatility Length: Period for volatility calculation (default: 20)
Signal Settings:
Signal Length: Period for the signal line double-EMA (default: 9)
TP Aggressiveness: Low (2.618 target), Medium (1.0 target), High (0.618 target) (default: Medium)
Display Settings:
Show Cloud Fill: Toggle the directional Fibonacci band fill (default: true)
Show Signal Line: Toggle the triple-smoothed signal line (default: true)
Show Entry Signals: Toggle entry and bounce signal markers (default: true)
Show Bar Colors: Toggle proximity-based bar coloring (default: true)
Show Dashboard: Toggle the seven-row information table (default: true)
How to Use This Indicator
Step 1: Identify Trend State from the Cloud
The first check is always the cloud. When the lower Fibonacci bands are shaded (bull trend), the market is expected to support price from below. When the upper bands are shaded (bear trend), the market is expected to cap price from above. This orientation tells you which type of trade to look for: in bull trend, prioritize longs on basis or lower band touches; in bear trend, prioritize shorts on upper band touches or basis resistance.
Step 2: Enter on Breakout or Bounce
Two entry strategies are available and can be used independently or in combination. Breakout entries (basis crossover/crossunder) are momentum-based — they capture the early stage of a new directional basis move. Bounce entries are mean-reversion based — they exploit temporary dislocations where price dips below basis in a bull trend and recovers. The bounce condition (low below basis, close above basis) ensures the recovery is already occurring at signal time, not merely predicted.
Step 3: Manage Exits with Fibonacci Targets
Once entered, the Fibonacci band levels serve as structured exit targets. In Low aggressiveness mode, the target is the 2.618 band — appropriate for trending markets where the volatility expansion phase is expected to carry price far. In High aggressiveness mode, the 0.618 band is the target — suitable for choppy or ranging conditions where overextension is quickly reversed. The chosen TP level is shown in the dashboard.
Step 4: Monitor Dashboard for Contextual Data
The seven-row dashboard provides quantitative context that is not immediately visible from the chart alone. The "% from basis" row shows how extended price is as a percentage of the basis value. The "Fib Zone" row identifies which band pair price is currently between (e.g., between 1.0 and 1.618). This allows precise assessment of where price sits within the volatility structure without manually measuring band distances.
Indicator Limitations
The triple-smoothed basis introduces significant lag relative to the raw price. On short timeframes or fast-moving instruments, the basis will react to trend changes later than a single EMA of equivalent period. This is by design — users seeking faster response should reduce the basis length, accepting more noise in return.
Fibonacci ratios are not guarantees of price reaction. While these levels carry historical significance, markets do not mechanically respect any fixed level. The bands define zones of elevated probability, not certainties.
ATR volatility mode can be distorted by gap events (overnight gaps, earnings). In instruments prone to large gaps, the ATR will temporarily inflate, expanding all bands significantly for the ATR lookback period.
The trend state machine can remain in a prior trend state for extended periods when the basis is flat. During prolonged sideways markets, the cloud fill will reflect the last directional bias rather than the current neutral condition.
Bounce signals require price to wick below (for longs) or above (for shorts) the basis within a single bar. On higher timeframes where candles cover extended periods, this condition can mask the timing of the actual intrabar touch.
The signal line is derived entirely from the basis and shares the same lag characteristics. It should not be treated as an independent data source.
Originality Statement
The Fibonacci Volatility Cloud is an original integration of techniques that individually exist in various forms but have not been assembled in this specific combination or with these specific design choices.
The triple-smoothed EMA basis (EMA of EMA of EMA of HLC3) is a deliberate architectural choice that differs from standard Bollinger Band centerlines (single SMA), Keltner Channel basis (single EMA), and Donchian midpoints. The three-layer approach creates a distinctly different noise-filtering characteristic.
Using Fibonacci ratios (0.618, 1.0, 1.618, 2.618) as band multipliers rather than standard integer multiples (1, 2, 3) is an original application that connects the volatility channel framework to harmonic ratio analysis.
The direction-conditional cloud fill — where the visible fill switches between support bands and resistance bands based on current trend state — is an original visual design not found in standard volatility channel implementations.
The combination of ATR/StDev switchable volatility, triple-smoothed basis, Fibonacci multipliers, directional cloud, triple-smoothed signal line, proximity bar coloring, and a configurable TP tier system in a single cohesive indicator is not replicated by any publicly available TradingView indicator.
The bounce signal definition (low penetrates basis, close recovers above basis within same bar, during confirmed bull trend) is a precise, self-confirming condition that reduces false signals without requiring additional confirmation from a second indicator.
Disclaimer
The Fibonacci Volatility Cloud is provided for educational and informational purposes only. It is a technical analysis tool and does not constitute financial advice. No indicator can predict future market behavior with certainty. Past signal performance does not guarantee future results. All trading involves risk of loss. Users are solely responsible for their own trading decisions. Please consider your individual risk tolerance and consult a licensed financial professional before engaging in any trading activity.
-Made with passion by officialjackofalltrades
Indicador Pine Script®






















