Advanced Realized Volatility (Crypto Stocks Indices Forex)**Advanced Realized Volatility — Detailed Guide**
### What This Indicator Does
Advanced Realized Volatility (Crypto) measures the actual historical price fluctuation of an asset over a user-defined calendar-day window and expresses it as an annualized percentage. Unlike simple standard-deviation tools, it offers six statistically grounded estimators (Close-to-Close, Parkinson, Garman-Klass, Yang-Zhang, Rogers-Satchell, and EWMA), automatically converts a calendar-day lookback into the correct number of bars for any timeframe, and applies the proper annualization factor (√365 for crypto by default, √252 for traditional assets).
The indicator places the current volatility reading in historical context through percentile rank, classifies the market into four regimes (Low / Normal / High / Extreme), calculates Expected Moves for 1-, 7-, and 30-day horizons, and allows direct visual comparison with up to three other symbols. All key metrics appear in a compact on-chart table.
### Core Concepts Explained Simply
- **Realized Volatility (RV)** shows how much the asset has actually moved in the recent past, scaled to a one-year basis. Higher RV means larger typical price swings.
- **Percentile Rank** answers the question: “Is the current volatility high or low relative to its own history?” A reading of 15 means the present volatility is lower than 85 % of the readings in the chosen historical window.
- **Volatility regimes** translate the percentile into actionable categories:
- Low (compression) — percentile below 20
- Normal — 20 to 80
- High — above 80
- Extreme — above 95
- **Expected Move** converts the current annualized RV into an approximate price range the market is statistically likely to traverse over the next 1, 7, or 30 days.
- **Relative Volatility** and multi-asset lines show whether the current instrument is quieter or more turbulent than its peers or its own longer-term average.
### How to Set Up and Read the Indicator
1. Apply the script to any chart (crypto, stocks, indices, and forex work correctly).
2. Choose the volatility method. Yang-Zhang is the recommended default because it efficiently incorporates overnight gaps, open-to-close drift, and the high-low range.
3. Select a lookback in calendar days (30 days is a balanced starting point; shorter windows react faster, longer windows are smoother).
4. Leave annualization on Auto unless you have a specific reason to force 365 or 252.
5. Optionally enable one to three comparison symbols (e.g., BTC vs ETH, SOL, or QQQ) using the same method and period.
6. Turn on background regime coloring and the information table for at-a-glance context.
7. Observe three primary visual elements:
- The main RV line and any comparison lines
- Horizontal reference levels (mean, 20th and 80th percentiles)
- Background color that changes with the regime
The table always displays the current annualized RV, percentile rank with regime label, relative volatility, Expected Moves, and the values of any enabled comparison assets.
### Practical Trading Applications and Patterns
**1. Volatility Compression → Expansion (Breakout Preparation)**
When the percentile rank falls below 20 and the background turns to the Low-volatility color, the market is in a compressed state. Historically, prolonged low-volatility periods are frequently followed by a sharp expansion in range. Traders watch for price to break a well-defined consolidation, range, or chart pattern while RV is still low or just beginning to rise. The Expected Move values help set realistic profit targets once the expansion starts.
**2. High / Extreme Volatility Regime (Risk Management & Mean-Reversion Bias)**
A percentile above 80 (especially above 95) signals elevated or extreme turbulence. In these conditions:
- Position sizes are typically reduced.
- Stops are widened or switched to volatility-based (ATR or Expected Move multiples).
- Mean-reversion or fade strategies become more attractive after a climax move, because extreme readings often revert toward the mean.
- Trend-following systems may stay in the market but with tighter risk controls.
**3. Regime Shifts as Timing Filters**
A cross of the RV line above its longer-term mean or a move of the percentile from Low into Normal/High can confirm that a new directional move has volatility support. Conversely, a drop back into the Low regime after an expansion often marks the end of a volatile phase and the start of a quieter consolidation.
**4. Cross-Asset Relative Volatility**
When the main asset’s RV line sits significantly above or below the comparison lines, relative volatility strength or weakness appears. Example patterns:
- BTC RV rising while ETH RV stays flat or declines → possible BTC leadership or capital rotation into Bitcoin.
- An altcoin showing persistently higher RV than BTC → higher-risk, higher-reward environment that may require stricter position sizing.
- Equity index (QQQ or SPX) RV rising together with crypto → broader risk-off or risk-on regime alignment.
**5. Expected Move for Targets and Option Structures**
The 1-day, 7-day, and 30-day Expected Move figures provide statistically derived price ranges. Common uses:
- Setting take-profit levels at approximately 1× or 1.5× the Expected Move.
- Judging whether an options premium is rich or cheap relative to recent realized movement.
- Sizing positions so that a 1–2 Expected Move adverse excursion remains within acceptable risk.
**6. Volatility of Volatility (VoV)**
When enabled, VoV highlights periods when volatility itself is unstable. Rising VoV often accompanies regime transitions and can serve as an early warning that the current quiet or elevated state is about to change.
### Typical Workflow for Discretionary Traders
1. Note the current regime and percentile rank.
2. Check whether RV is rising or falling and how it compares with the chosen benchmark assets.
3. Read the Expected Move numbers to gauge the probable size of the next swing.
4. Align the volatility picture with classical price action (breakouts from compression, exhaustion after extreme readings, relative strength between assets).
5. Adjust position size, stop distance, and profit targets accordingly.
6. Use the built-in alerts for regime changes, RV crosses of its mean, or sharp expansions so that monitoring can be partly automated.
### Recommended Starting Settings
- Method: Yang-Zhang
- Lookback: 30 calendar days
- Annualization: Auto
- Percentile lookback: 365 days
- Background coloring and table: enabled
- One or two comparison symbols relevant to the traded asset
These settings provide a balanced, responsive view on most crypto pairs while remaining stable enough for higher-timeframe analysis.
The indicator does not generate buy or sell signals by itself. It supplies a quantitative volatility context that improves timing, risk management, and cross-market comparison. When combined with price structure, volume, and a clear trading plan, the regimes, percentile extremes, and Expected Moves become reliable filters for identifying high-probability compression-to-expansion setups, managing risk during turbulent periods, and comparing the relative “temperature” of different assets.
⚠️ Disclaimer
This indicator is for *educational and informational purposes only*. It does not constitute financial advice. Always do your own research before making investment decisions.
*Indicator by:* iCD_creator
*Version:* 1.0
*Pine Script™ Version:* 6
---
Updates & Support
For questions, suggestions, or bug reports, please comment below or message the author.
*Like this indicator? Leave a 👍 and share your feedback!* Indicator

Volatility Drag OscillatorVolatility Drag Oscillator — what is holding exposure costing you, and what does leverage do to it?
Compound growth is g = μ − σ²/2; under leverage, g(L) = L·μ − L²·σ²/2. Return scales with L, drag scales
with L² — which is the whole reason leverage does not raise your probability of success. Volatility is
estimable in hundreds of bars; drift needs decades. So this tool measures only the knowable half:
- DRAG = σ²/2 annualised (Yang-Zhang by default; Close-to-close / Parkinson / Garman-Klass /
Rogers-Satchell selectable to see estimator disagreement = gap-risk information), EWMA-smoothed and
ranked into a percentile so you know if today is a cheap or expensive time to hold.
- DRAG DECOMPOSITION — realised drag split into its exact cumulant pieces: variance (σ²/2) + skew +
excess-kurtosis, shown as "σ² · skw · tail" in %/yr. A fat-tail warning tells you HOW MUCH of your
drag is tails, not just that they exist — and it compares realised drag to its own Gaussian part, so
it can't be fooled by estimator choice.
- LEVERAGE CURVE — drag at 1×/2×/3×, plus break-even L_be = 2μ/σ² and Kelly = μ/σ², shown ONLY as
conditionals on an edge YOU enter. The script never estimates drift, and says why.
READ IT how you like: a familiar 0-100 percentile OSCILLATOR in the pane (cheap<20, expensive>80,
midline 50, like an RSI of holding-cost), or the absolute drag %/yr line. On price, a heat-RIBBON and
green/red regime triangles show cheap→expensive to hold — VOLATILITY regime, direction-agnostic. A red
marker means "expensive, size down", never "go short".
No directional claim and no backtest — there is nothing here to fit. Descriptive risk context, not advice.
Leverage magnifies losses; this shows one cost of it, not all risks. Indicator

Skew Divergence OscillatorSkew Divergence Oscillator
A bounded oscillator built from the rolling skewness (asymmetry) of returns — whether recent moves lean toward big up-days or big down-days — with a divergence engine that compares that asymmetry against price. The read most tools miss: when price makes a new high but return skew is turning down (large down-moves creeping in), the advance is quietly losing its character before price confirms it. It estimates skew from higher-resolution realized data, confirms divergences on a higher timeframe, and forward-calibrates whether they pay on the chart you're viewing — in plain language.
Why these parts are combined (not a mashup for show). Each fixes a flaw in the previous one. Skewness is a distributional read price action alone doesn't show — it captures which tail is getting heavier, a leading change in market character. Realized estimation measures skew from intrabar returns instead of one value per bar, so short-window skew isn't jumpy — the standard approach in modern risk research. Divergence relates that asymmetry back to price, turning a statistic into a timing read. Higher-timeframe confirmation and forward calibration remove single-timeframe noise and blind faith respectively. Together they form one coherent tool.
How it works. Returns feed a rolling third standardized moment (skew = m3/sd³). With realized estimation on, skew is computed from a lower-timeframe return stream (confirmed only). It's standardized and soft-bounded to ±100. Divergence is detected from confirmed price pivots versus the skew line (regular and optional hidden); with MTF on, it counts only if the higher timeframe agrees. Each signal is labelled by a triple barrier — a profit target and equal stop in ATR units plus a time limit — split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict (Bull/Bear skew divergence confirmed, unconfirmed, or Wait) and the Conviction, which reads "High" only when that divergence type shows a positive edge that survives the test on this symbol — otherwise it openly says "context only" or "no proven edge here." A skew divergence is an early character warning, not a trend signal — pair it with your own entry trigger and risk plan.
What's original. The realized-skew engine as a divergence source, the higher-timeframe confirmation layer, the triple-barrier forward calibration with an out-of-sample split, and a conviction read that admits when an apparent edge isn't statistically real.
Honesty & limitations. Skew from short windows is noisy. Edge figures are computed on this chart's own history with overlapping windows and no costs — context, not a guaranteed backtest; past behaviour doesn't predict the future. Non-repainting: pivots confirm late and never move; realized and HTF reads use confirmed data only.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions. Indicator

Path-Dependent Volatility Forecast# Path-Dependent Volatility Forecast — Publication Description
### What it is
A self-calibrating forecaster of an instrument’s own **realised volatility**, built only from its price path. It estimates how large the next bar’s volatility is likely to be, explains *why* (which part of the price path is driving it), and shows *how well* that explanation is currently working on the symbol in front of you. It is **context for risk and regime awareness — not a buy/sell signal and not a strategy.** It plots in a sub-pane: a forecast line, the realised-vol line it tracks, regime shading, and a compact dashboard.
### The idea, in one paragraph
Volatility is largely **path-dependent**: an asset’s volatility is mostly explained by its own recent price path. Falling prices tend to lift volatility (the leverage effect), recent movement tends to persist (volatility clustering), and strong rallies add their own volatility. This script turns that idea into a working, per-instrument forecaster and then proves the fit on-chart.
### Why these components are combined (mashup justification)
This is **one model expressed as a single estimate → explain → calibrate → decompose → verify loop**, not a bundle of unrelated indicators stacked together. Each stage is necessary; remove any one and the result breaks:
1. **Realised-volatility estimator** (range-based Garman-Klass, or close-to-close) measures the ground-truth volatility the model is trying to explain. Without it there is nothing to fit to.
2. **Path features** are the model’s inputs: a *trend / leverage* feature (a weighted average of recent returns) and an *activity / churn* feature (the square root of a weighted average of recent squared returns), each built as a blend of fast, medium and slow kernels so it carries short **and** long memory; plus an **upside-convexity** term (so strong rallies add volatility) and a **persistence (memory)** term (a longer-horizon average of past realised vol). Features without calibration are unscaled noise.
3. **Rolling ridge calibration** fits the weights of `realised_vol ≈ b0 + b1·trend + b2·activity + b12·upside + b3·memory` to *this* instrument by rolling regression. The predictors are correlated, so the fit is **ridge-regularised on standardised predictors** to keep the coefficients steady. Calibration without features has nothing to fit; features without calibration cannot be put in the right units.
4. **Decomposition** splits the forecast into its drivers — **Path** (leverage / upside), **Activity** (churn), and **Memory** (persistence) — which is the interpretation the model makes possible.
5. **Live fit read-out** (rolling R² of forecast vs realised) is the proof the loop is working on the asset in front of you.
So the five parts are stages of a single pipeline: measure realised vol, explain it from the path, calibrate to the instrument, decompose it, and verify the fit — one engine, not five overlays.
### How it works (more detail)
- **Inputs are lagged one bar.** The path features are built from confirmed past returns, so each bar’s forecast is known before that bar’s own return forms — a genuine one-step-ahead forecast. Historical values do not change.
- **Kernels.** Each feature blends a fast, a medium and a slow-tail kernel. The slow tail approximates the heavy, slowly-decaying weighting that long-memory volatility requires; the fast kernel keeps it responsive.
- **Positivity.** The activity feature is floored to stay strictly positive, keeping the forecast well-defined.
- **Calibration.** A 4-predictor ridge regression is solved each bar over a rolling window via standardised correlation-matrix inversion, then mapped back to raw units. Ridge (a single, adjustable penalty) is what keeps the correlated predictors from producing erratic coefficients.
### How to read it
- **Bold line** = the model’s volatility **forecast**; **faint line** = the **realised** volatility it tracks. Close agreement = the model fits here.
- **Driver** tells you *why* volatility is where it is: **Path** (a falling path lifting vol = leverage/fear, or a strong rally = upside), **Activity** (recent churn persisting), or **Memory** (volatility coasting on its own persistence). The % is that channel’s share.
- **Model fit** is the rolling R² — how much of realised-vol variance the path explains on this symbol. Trust the forecast more when it is high; treat it cautiously when it reads “weak.”
- **Regime** (Low / Normal / High / Extreme) is the forecast’s own percentile. Rising vol from a Low regime is an expansion; this is context, not a trade call.
- **Markers:** ▲ red = a fear-driven spike; ◆ amber = a volatility expansion into the High regime.
A practical note: this forecasts the **size** of moves, not their **direction**. A high forecast says “expect bigger swings,” not “go long/short.” Typical uses are risk-management context (sizing, stop width), regime filtering (compressed Low regimes precede expansions; Extreme regimes tend to mean-revert), and options-style context (is volatility likely to rise or fade) — always as context layered on your own method.
### Universal data layer (works on any asset, any market)
The script reads the chart’s own symbol by default, so it runs on equities, futures, FX, crypto and indices with no configuration. Settings let you:
- choose the **price source** (close / hl2 / hlc3 / ohlc4),
- optionally compute the forecast on a **different symbol** than the one charted,
- optionally run on a **fixed calculation timeframe** for a stable basis,
- choose the realised-vol estimator (range-based or close-to-close) for symbols with or without usable ranges.
The dashboard theme is **adaptive**: it reads the chart background and keeps text and cells legible on dark or light colour schemes (or you can force Dark/Light).
### What makes it original
A working, per-instrument path-dependent **realised-volatility forecaster** with rolling ridge self-calibration, a three-way (Path / Activity / Memory) decomposition, and an on-chart fit score — a recent institutional volatility concept made legible and measurable on a chart, rather than an ATR or a standard-deviation band. It does not merely display a volatility statistic; it fits a small volatility model to the symbol and shows you both the forecast and how much to trust it.
### Limitations (honest)
- Volatility is forecastable but never certain. The realised-volatility research this builds on explains a **minority** of realised-vol variance even at its best, so a rolling fit in the 0.3–0.6 range is doing well, not failing.
- The forecast is a **reduced, practical form** of the underlying framework; it is meant as context, not a precise volatility product.
- The fit dips through structural breaks; the dashboard shows it (“weak”), which is itself useful information.
- An optional higher calculation timeframe than the chart can update intrabar until that bar closes; the default (chart timeframe) does not.
### Credits
The path-dependent volatility framework this script operationalises is from the academic work of **J. Guyon and J. Lekeufack, “Volatility is (mostly) path-dependent” (2023)**. The persistence/memory predictor follows the heterogeneous-autoregressive (HAR) realised-volatility approach of **F. Corsi (2009)**. The range-based realised-variance estimator is **Garman & Klass (1980)**. The activity-positivity treatment follows results by **Nutz & Riveros Valdevenito** and **Andrès & Jourdain**. This implementation, the rolling ridge self-calibration, the Path/Activity/Memory decomposition, and the on-chart fit score are the author’s own work.
### Disclaimer
This script is a study/indicator for chart analysis and education only. It is **not** a strategy, **not** a recommendation, and **not** financial advice. It places no orders and guarantees no outcome. All values are estimates derived from price and can be wrong, especially through structural breaks and on illiquid or low-history symbols. Markets carry risk; do your own research and manage your own risk.
Indicator

CDC Action Zone+TrueMarket Mean (BTC Focus) By Beckte## Overview
This indicator is a macro-focused trend following and cyclical value tracking tool, specifically designed for Bitcoin (BTC) long-term investors. It combines the momentum logic of the well-known **CDC Action Zone** with a mathematical simulation of the On-Chain **Realized Price** model.
The main purpose of this script is to identify high-probability, macro-generational accumulation zones while filtering out early or false bottom signals during aggressive downtrends.
---
## Key Components
### 1. CDC Action Zone (Trend & Momentum)
Based on the classic EMA 12 and EMA 26 crossover logic, this component colors the candlesticks to reflect the market's current momentum:
- 🟢 **Bright Green:** Strong Bullish Momentum (Hold / Trend is up)
- 🔵 **Blue:** Early Bullish Sign / Potential Reversal (Watch closely or start accumulation)
- 🔴 **Bright Red:** Strong Bearish Momentum (Stay in cash / Wait)
- 🟠 **Orange:** Early Bearish Sign / Technical Rebound in Bear Market
### 2. Realized Price Proxy (The Cyclical Floor)
In on-chain analysis, the **Realized Price** represents the average cost basis of all aggregate Bitcoin supply moving on-network, without omitting lost or dormant coins.
Since native on-chain data requires external API subscriptions on PulseWire, this script utilizes a specialized long-term statistical proxy (**730-day SMA with custom logarithmic offsets**) to simulate this ultimate cyclical floor. Historically, major bear market bottoms (2015, 2018, 2022) have strictly formed near or slightly below this baseline.
---
## How it Works & Entry Strategy (The Anti-Doi Mechanism)
To avoid catching falling knives during a capitulation event, this script enforces a strict double-confirmation rule:
1. **Value Zone Check:** The current market price must correct down to within **10% of the Realized Price Proxy** (the light blue line). This ensures you are buying Bitcoin at an extreme discount relative to historical network value.
2. **Momentum Trigger:** Once inside the Value Zone, the script waits for the **CDC Action Zone to flip from Red/Orange to Blue or Green**.
When both conditions are met, a **"REALIZED BUY"** label will plot beneath the candlestick, signaling a safe, low-risk entry spot with a highly compressed downside.
---
## Disclaimer & Credits
- **Credits:** The trend-following logic is inspired by the legendary "CDC Action Zone" concept popularized by Piriya Sambandaraksa. The valuation floor is based on the Realized Price on-chain metric conceptualized by the crypto-asset research community.
- **Disclaimer:** This indicator is designed for high-timeframe spot accumulation (recommended: 1D or 4H charts). It is not a financial advisory tool or a guarantee of future profits. Past performance does not indicate future results. Always practice proper risk management. Indicator

Hash Dispersion Cone## Overview
The **Hash Dispersion Cone** is a forward-projecting statistical probability envelope built on realized volatility. Anchored to the current bar's close price, it projects where price is statistically expected to trade over the next N bars using log-normal volatility scaling — the same mathematical framework used by professional options desks and quantitative risk managers.
This is not a buy/sell signal generator. It is a **probability map** — a live, continuously recalculating field that shows the market's statistical boundaries given current realized volatility. When volatility is low, the cone is tight. When volatility is expanding, the cone widens in real time.
> *"Know your range before the market shows it to you."*
> — Hash Capital Research
---
## How It Works
### The Mathematics
The cone is constructed using the **square-root-of-time rule**, a foundational principle of financial mathematics. At each forward bar `t`, the projected price boundaries are calculated as:
```
Upper_k(t) = AnchorPrice × exp( +k × σ × √t )
Lower_k(t) = AnchorPrice × exp( −k × σ × √t )
```
Where:
- `k` = standard deviation multiplier (1 for 1σ, 2 for 2σ)
- `σ` = realized volatility per bar (selected method)
- `t` = number of bars forward
Using the **log-normal form** is intentional and correct. It keeps the cone asymmetric in price space — the upside boundary is always further from anchor than the downside boundary by an equal percentage amount. This reflects how asset prices actually behave: they cannot go below zero, but can theoretically rise without limit.
### Why the Cone Moves With Price
The cone repaints every bar because it is always anchored to the **current close**. This is by design. It answers the question: *"Given what volatility is right now, where could price go from here?"* — not where it could have gone from a past bar.
---
## Volatility Methods
Three realized volatility estimators are available. Each has distinct statistical properties suited to different market conditions.
### Close-to-Close (Default)
The standard log-return standard deviation:
```
σ = stdev( ln(Close / Close ), lookback )
```
Most widely understood. Can underestimate volatility on assets that gap frequently or have large intrabar swings. Best for: **daily timeframes, equities, stable assets**.
### Parkinson (High-Low)
Uses the high-low range instead of close-to-close returns:
```
σ² = mean / (4 × ln2)
```
Approximately **5x more statistically efficient** than Close-to-Close for the same lookback period. Captures intrabar volatility that close-to-close misses. Best for: **crypto, commodities, FX — any asset with large intrabar ranges**.
### Garman-Klass (OHLC)
The most efficient of the three estimators, using all four price points:
```
σ² = mean
```
Most accurate for intraday analysis where the open-to-close gap carries information. Best for: **intraday timeframes (1H, 4H), equities with significant opening gaps**.
---
## Inputs Reference
### Volatility Calculation
| Input | Default | Description |
|---|---|---|
| Lookback Period | 30 | Bars used to calculate σ. Lower = more reactive. Higher = smoother. |
| Volatility Method | Close-to-Close | Estimator used. See Volatility Methods above. |
| Vol Trend MA Length | 10 | SMA length applied to σ for regime classification. |
**Lookback Tuning Guide:**
- `10–20` bars → reactive, tracks recent volatility closely, cone resizes quickly
- `30` bars → balanced default, smooths out single-spike distortions
- `60–100` bars → slow-moving, regime-level volatility, stable cone width
### Projection
| Input | Default | Description |
|---|---|---|
| Forward Bars | 15 | How many bars ahead the cone projects. |
| Show 1σ Band | On | Displays ±1σ boundary (~68% probability zone). |
| Show 2σ Band | On | Displays ±2σ boundary (~95% probability zone). |
| Show Midline Anchor | On | Dotted horizontal line at anchor price. |
**Forward Bars Tuning Guide:**
- `5–10` bars → scalping and intraday setups
- `10–20` bars → swing trading (recommended for 4H/Daily)
- `20–50` bars → position trading and options expiry targeting
**Important:** Doubling forward bars does NOT double the projected range. Due to the √t rule, doubling projection bars widens the cone by only ~41%.
## Visual Guide
### Band Colors and Meaning
```
+2σ ──────────────────────────── Crimson solid (outer extreme, ~95%)
░░░░ TEAL FILL (upside risk zone) ░░░░
+1σ - - - - - - - - - - - - - - Green dashed (primary upside boundary, ~68%)
▓▓▓▓ NAVY FILL (highest-probability core) ▓▓▓▓
MID ····························· Grey dotted (anchor / flat scenario)
▓▓▓▓ NAVY FILL (highest-probability core) ▓▓▓▓
−1σ - - - - - - - - - - - - - - White dashed (primary downside boundary, ~68%)
░░░░ MAGENTA FILL (downside risk zone) ░░░░
−2σ ──────────────────────────── Crimson solid (outer extreme, ~95%)
```
### Three-Layer Fill System
**Navy Core (±1σ interior):** The highest-probability zone. Statistically, ~68% of all future closes are expected to land here. This is where price "wants" to stay in a low-volatility regime.
**Teal Upside Zone (+1σ to +2σ):** The upside risk corridor. Price entering this zone is statistically elevated — possible, but in the outer 14% of expected outcomes.
**Magenta Downside Zone (−1σ to −2σ):** The downside risk corridor. Mirror of the teal zone. Price here signals a statistically significant down-move.
---
## Trading Applications
### 1. Cone Width as Regime Filter
The most important signal is the **width of the cone itself**, not where price is within it.
- **Tight cone** = low volatility, compressed range → range-bound playbook (fade edges, mean revert to midline)
- **Wide cone** = high volatility, expanded range → momentum playbook (ride direction, wider stops)
Never take a counter-trend trade in a wide, expanding cone. Never chase a breakout in a tight, contracting cone.
### 2. Price at 1σ Edge = Mean Reversion Setup
When price reaches the projected +1σ or −1σ label price, it has statistically entered the outer 32% of expected outcomes.
**Setup:**
```
Condition 1: Vol Regime is STABLE (─)
Condition 2: Price has reached the ±1σ label level
Condition 3: Rejection candle confirms (wick, doji, engulf)
Entry: Fade the move back toward midline
Target: Anchor price (midline)
Stop: Just beyond the ±2σ label
R:R: Typically 2:1 to 3:1 depending on cone width
```
### 3. 2σ Touch = Extreme Signal
A touch of the ±2σ boundary represents a 2-standard-deviation move. Statistically, only ~5% of future closes are expected to exceed this level.
- In a **stable** or **contracting** regime: high-conviction mean reversion entry with defined risk to the 2σ line
- In an **expanding** regime: possible breakout continuation — wait for candle confirmation before fading
- Use the 2σ label price directly as a hard stop level for trades taken inside the cone
### 4. Vol Regime Arrow as Trade Filter
The regime classification in the dashboard acts as a meta-filter over all other signals.
- **▲ EXPANDING (red):** Do not counter-trend trade. Only take momentum entries in the direction of the move or stay flat. Cone edges are likely to be broken.
- **▼ CONTRACTING (green):** Volatility is compressing. A breakout is loading. Watch for the first expansion candle and trade the direction of the break. This is often the highest R:R setup the cone generates.
- **─ STABLE (white):** Range conditions active. Mean reversion setups at σ edges are highest probability in this state.
### 5. Stop Placement Reference
The σ label prices at the cone's right edge provide statistically-grounded stop levels:
- **Conservative stop:** Beyond ±2σ label (95% of moves contained)
- **Standard stop:** Beyond ±1σ label (68% of moves contained)
- **Tight stop:** A fixed percentage of the ±1σ distance
This gives every trade a volatility-adjusted stop rather than an arbitrary fixed-pip or percentage stop.
---
## Timeframe Recommendations
| Timeframe | Lookback | Forward Bars | Vol Method | Best Use |
|---|---|---|---|---|
| 5m / 15m | 20 | 10 | Garman-Klass | Scalping entries |
| 1H | 30 | 15 | Parkinson or GK | Intraday swing |
| 4H | 30 | 15 | Parkinson | Swing trading (default) |
| Daily | 30–50 | 20 | Close-to-Close | Position trading |
| Weekly | 20 | 10 | Close-to-Close | Macro range framing |
---
## Asset Class Notes
**Crypto (BTC, ETH, SOL, etc.):**
Parkinson is recommended over Close-to-Close due to large intrabar ranges common in 24/7 markets. Cone will be noticeably wider than equities at equivalent timeframes, reflecting structurally higher realized volatility. The 2σ touch setup is especially reliable on 4H BTC during STABLE regimes.
**FX:**
Parkinson works well. Forward Bars of 10–15 on 4H aligns well with typical intraweek swing durations. Cone width is generally tighter than crypto, making σ edge touches more frequent.
**Equities / Indices:**
Garman-Klass recommended for intraday. Close-to-Close is standard for daily and above. Be aware that equity close-to-close can underestimate true vol during earnings season — consider switching to Garman-Klass temporarily.
**Commodities:**
Parkinson preferred. Energy and agricultural commodities have gap and range behavior similar to crypto.
---
## Technical Notes
- The cone redraws on every bar close. It is anchored to the current close and always projects forward from the most recent confirmed price. This is expected behavior — not a repaint flaw.
- Fills are capped at 16 segments per zone to remain within Pine Script's linefill object limit (~50 total). At default 15 forward bars, all fills render completely.
- The annualization factor is automatically adjusted for timeframe: Daily (√252), Weekly (√52), Monthly (√12), and intrabar (derived from `timeframe.in_seconds()`).
- All price labels use comma-formatted output (e.g., `74,161.34`) for readability at large price scales.
---
## Disclaimer
The Hash Dispersion Cone is an educational and analytical tool. Statistical probability does not guarantee any specific price outcome. All trading involves risk. Past statistical behavior does not guarantee future results. This indicator does not constitute financial advice.
---
*Published on PulseWire by Hash Capital Research * Indicator

Indicator

vol_coneDraws a volatility cone on the chart, using the contract's realized volatility (rv). The inputs are:
- window: the number of past periods to use for computing the realized volatility. VIX uses 30 calendar days, which is 21 trading days, so 21 is the default.
- stdevs: the number of standard deviations that the cone will cover.
- periods to project: the length of the volatility cone.
- periods per year: the number of periods in a year. for a daily chart, this is 252. for a thirty minute chart on a contract that trades 23 hours a day, this is 23 * 2 * 252 = 11592. for an accurate cone, this input must be set correctly, according to the chart's time frame.
- history: show the lagged projections. in other words, if the cone is set to project 21 periods in the future, the lines drawn show the top and bottom edges of the cone from 23 periods ago.
- rate: the current interest or discount rate. this is used to compute the forward price of the underlying contract. using an accurate forward price allows you to compare the realized volatility projection to the implied volatility projections derived from options prices.
Example settings for a 30 minute chart of a contract that trades 23 hours per day, with 1 standard deviation, a 21 day rv calculation, and half a day projected:
- stdevs: 1
- periods to project: 23
- window: 23 * 2 * 21 = 966
- periods per year: 23 * 2 * 252 = 11592
Additionally, a table is drawn in the upper right hand corner, with several values:
- rv: the contract's current realized volatility.
- rnk: the rv's percentile rank, compared to the rv values on past bars.
- acc: the proportion of times price settled inside, versus outside, the volatility cone, "periods to project" into the future. this should be around 65-70% for most contracts when the cone is set to 1 standard deviation.
- up: the upper bound of the cone for the projection period.
- dn: the lower bound of the cone for the projection period.
Limitations:
- pinescript only seems to be able to draw a limited distance into the future. If you choose too many "periods to project", the cone will start drawing vertically at some limit.
- the cone is not totally smooth owing to the facts a) it is comprised of a limited number of lines and b) each bar does not represent the same amount of time in pinescript, as some cross weekends, session gaps, etc. Indicator

vol_boxA simple script to draw a realized volatility forecast, in the form of a box. The script calculates realized volatility using the EWMA method, using a number of periods of your choosing. Using the "periods per year", you can adjust the script to work on any time frame. For example, if you are using an hourly chart with bitcoin, there are 24 periods * 365 = 8760 periods per year. This setting is essential for the realized volatility figure to be accurate as an annualized figure, like VIX.
By default, the settings are set to mimic CBOE volatility indices. That is, 252 days per year, and 20 period window on the daily timeframe (simulating a 30 trading day period).
Inside the box are three figures:
1. The current realized volatility.
2. The rank. E.g. "10%" means the current realized volatility is less than 90% of realized volatility measures.
3. The "accuracy": how often price has closed within the box, historically.
Inputs:
stdevs: the number of standard deviations for the box
periods to project: the number of periods to forecast
window: the number of periods for calculating realized volatility
periods per year: the number of periods in one year (e.g. 252 for the "D" timeframe)
Indicator

Indicator

Indicator

Realized VolatilityRealized / Historical Volatility
Calculates historical, i.e. realized volatility of any underlying. If frequency is not the daily, but for example 6h, 30min, weeks or months, it scales the initial setting to be suitable for the different time frame.
Examples with default settings (30 day volatility, 365 days per year):
A) Frequency = Daily:
Returns 30 day historical volatility, under the assumption that there are 365 trading days in a year.
B) Frequency = 6h:
Still returns 30 day historical volatility, under the assumption that there are 365 trading days in a year. However, since 6h granularity fits 4 times in 24 hours, it rescales the look back period to rather 30*4 = 120 units to still reflect 30 day historical volatility. Indicator

OHLC Volatility Estimators by @Xel_arjonaDISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is by Creative-Commons as PulseWire's regulations. Any use, copy or re-use of this code should mention it's origin as it's authorship.
WARNING NOTICE!
THE INCLUDED FUNCTION MUST BE CONSIDERED AS DEBUGING CODE The models included in the function have been taken from openly sources on the web so they could have some errors as in the calculation scheme and/or in it's programatic scheme. Debugging are welcome.
WHAT'S THIS?
Here's a full collection of candle based (compressed tick) Volatility Estimators given as a function, openly available for free, it can print IMPLIED VOLATILITY by an external symbol ticker like INDEX:VIX.
Models included in the volatility calculation function:
CLOSE TO CLOSE: This is the classic estimator by rule, sometimes referred as HISTORICAL VOLATILITY and is the must common, accepted and widely used out there. Is based on traditional Standard Deviation method derived from the logarithm return of current close from yesterday's.
ELASTIC WEIGHTED MOVING AVERAGE: This estimator has been used by RiskMetriks®. It's calculation is based on an ElasticWeightedMovingAverage Standard Deviation method derived from the logarithm return of current close from yesterday's. It can be viewed or named as an EXPONENTIAL HISTORICAL VOLATILITY model.
PARKINSON'S: The Parkinson number, or High Low Range Volatility, developed by the physicist, Michael Parkinson, in 1980 aims to estimate the Volatility of returns for a random walk using the high and low in any particular period. IVolatility.com calculates daily Parkinson values. Prices are observed on a fixed time interval. n=10, 20, 30, 60, 90, 120, 150, 180 days.
ROGERS-SATCHELL: The Rogers-Satchell function is a volatility estimator that outperforms other estimators when the underlying follows a Geometric Brownian Motion (GBM) with a drift (historical data mean returns different from zero). As a result, it provides a better volatility estimation when the underlying is trending. However, this Rogers-Satchell estimator does not account for jumps in price (Gaps). It assumes no opening jump. The function uses the open, close, high, and low price series in its calculation and it has only one parameter, which is the period to use to estimate the volatility.
YANG-ZHANG: Yang and Zhang were the first to derive an historical volatility estimator that has a minimum estimation error, is independent of the drift, and independent of opening gaps. This estimator is maximally 14 times more efficient than the close-to-close estimator.
LOGARITHMIC GARMAN-KLASS: The former is a pinescript transcript of the model defined as in iVolatility . The metric used is a combination of the overnight, high/low and open/close range. Such a volatility metric is a more efficient measure of the degree of volatility during a given day. This metric is always positive.
Indicator
