OPEN-SOURCE SCRIPT
Price Density Clouds [EXCAVO]

Continuous Kernel-Density Map of Where Price Has Actually Traded
The Price Density Clouds builds a smooth, continuous probability density of
price over a lookback window and paints it as gradient clouds directly behind
the candles. Dense, saturated clouds mark value zones - the equilibrium levels
where the market has spent the most time and where price tends to stall and
revert. Thin, transparent gaps mark inefficiency zones - levels price travels
through quickly. A dashed POC line marks the single highest-probability price,
and the Value Area High / Low bracket the core of the distribution.
This is not a bin-based volume profile. Instead of chopping price into discrete
buckets, KDE sums a smooth gaussian kernel around every price point, producing a
continuous density curve with no bin-edge artefacts. The bandwidth is set
automatically by Silverman's rule, so the smoothing adapts to the instrument's
own volatility.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. Gradient clouds appear behind the candles
over the lookback window, brightest at the highest-probability
levels and fading out toward thin zones.
Step 2 → Read the clouds. Saturated bands = value / equilibrium where
price tends to stall and mean-revert. Faint gaps = inefficiency
where price moves fast - natural travel targets.
Step 3 → Use the POC. The dashed POC line is the single most-traded
level - a robust magnet and support / resistance anchor. Price
far from POC has a statistical pull back toward it.
Step 4 → Use the Value Area. The dotted Value Area High / Low bracket
the core of the distribution (default 70%). Acceptance inside the
area is balance; rejection outside it is imbalance worth trading.
Step 5 → Check the side profile. The gradient density profile on the
right of the last bar is the same density rotated 90 degrees - a
quick read of the full distribution shape at a glance.
Step 6 → Combine with structure. Clouds are context, not direction.
They pair well with trend, sweep, and breakout tools - a breakout
into a thin zone tends to run; a breakout into a dense zone tends
to stall.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Gaussian Kernel Density
Every close in the lookback window contributes a gaussian bell curve centred at
its own price. The curves are summed across the price range to produce a single
continuous density function: density(x) = sum over j of exp(-0.5 x ((x - price_j)
/ h)^2). Levels where many bars cluster get tall, overlapping kernels and a high
density; isolated levels get a low density.
◆ Silverman Bandwidth
The kernel width h controls smoothness. It is set automatically by Silverman's
rule of thumb: h = 1.06 x sigma x n^(-1/5), where sigma is the stdev of the
lookback prices and n is the sample size. The Bandwidth Multiplier input scales
this for sharper or smoother clouds. Auto-bandwidth means the same settings
adapt across instruments and timeframes.
◆ Normalisation and POC
The density is evaluated at Resolution levels between the lookback high and low,
then normalised so the peak equals 1.0. That peak level is the POC (Point of
Control) - the single highest-probability price. Cloud opacity and colour are
driven by each level's normalised density.
◆ Value Area
Starting at the POC, the algorithm expands outward, each step absorbing the
denser of the two neighbouring levels, until the enclosed density reaches the
Value Area % of the total (default 70). The price extent reached becomes the
Value Area High and Low.
◆ Gradient Rendering
Each density band of the cloud is drawn as a horizontal box tinted by a
two-colour gradient: the Low Density Color at thin levels through to the High
Density Color at the POC, with opacity ramping in parallel. Adjacent bands tile
continuously, so the cloud reads as a smooth heat-map rather than discrete
blocks. The same gradient drives the right-side density profile, whose width
per level scales with density - at the default resolution the edge reads as a
near-smooth wave while keeping the per-level gradient colour.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Continuous Density, Not Bins
Standard volume / price profiles split price into discrete bins, so the result
depends heavily on bin size and shows hard edges. KDE produces a smooth
continuous curve - no bin-edge artefacts, no arbitrary bucket count, just the
true shape of where price has traded.
◆ Auto-Adaptive Bandwidth
Silverman's rule sizes the smoothing from the instrument's own volatility and
sample size. The clouds stay meaningful on BTC, EURUSD, gold or an index with
the same default settings.
◆ Value Structure In One View
POC, Value Area High / Low and the full density shape are all on the chart at
once, with a matching side profile - the complete market-profile read without a
separate pane or a session reset.
◆ Premium Gradient Visual
A smooth two-colour density gradient behind the candles with parallel opacity
ramp, a clean dashed POC, dotted value-area lines, and a right-side profile
histogram. The clouds sit behind price as context and never clutter the read.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel (top right) with the current value read:
Legend table (bottom left) explains every colour. Both panels toggle in the
Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
Engine
Visualization
Dashboard
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best regards,
EXCAVO
The Price Density Clouds builds a smooth, continuous probability density of
price over a lookback window and paints it as gradient clouds directly behind
the candles. Dense, saturated clouds mark value zones - the equilibrium levels
where the market has spent the most time and where price tends to stall and
revert. Thin, transparent gaps mark inefficiency zones - levels price travels
through quickly. A dashed POC line marks the single highest-probability price,
and the Value Area High / Low bracket the core of the distribution.
This is not a bin-based volume profile. Instead of chopping price into discrete
buckets, KDE sums a smooth gaussian kernel around every price point, producing a
continuous density curve with no bin-edge artefacts. The bandwidth is set
automatically by Silverman's rule, so the smoothing adapts to the instrument's
own volatility.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW TO USE
Step 1 → Add the indicator. Gradient clouds appear behind the candles
over the lookback window, brightest at the highest-probability
levels and fading out toward thin zones.
Step 2 → Read the clouds. Saturated bands = value / equilibrium where
price tends to stall and mean-revert. Faint gaps = inefficiency
where price moves fast - natural travel targets.
Step 3 → Use the POC. The dashed POC line is the single most-traded
level - a robust magnet and support / resistance anchor. Price
far from POC has a statistical pull back toward it.
Step 4 → Use the Value Area. The dotted Value Area High / Low bracket
the core of the distribution (default 70%). Acceptance inside the
area is balance; rejection outside it is imbalance worth trading.
Step 5 → Check the side profile. The gradient density profile on the
right of the last bar is the same density rotated 90 degrees - a
quick read of the full distribution shape at a glance.
Step 6 → Combine with structure. Clouds are context, not direction.
They pair well with trend, sweep, and breakout tools - a breakout
into a thin zone tends to run; a breakout into a dense zone tends
to stall.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ HOW IT CALCULATES
◆ Gaussian Kernel Density
Every close in the lookback window contributes a gaussian bell curve centred at
its own price. The curves are summed across the price range to produce a single
continuous density function: density(x) = sum over j of exp(-0.5 x ((x - price_j)
/ h)^2). Levels where many bars cluster get tall, overlapping kernels and a high
density; isolated levels get a low density.
◆ Silverman Bandwidth
The kernel width h controls smoothness. It is set automatically by Silverman's
rule of thumb: h = 1.06 x sigma x n^(-1/5), where sigma is the stdev of the
lookback prices and n is the sample size. The Bandwidth Multiplier input scales
this for sharper or smoother clouds. Auto-bandwidth means the same settings
adapt across instruments and timeframes.
◆ Normalisation and POC
The density is evaluated at Resolution levels between the lookback high and low,
then normalised so the peak equals 1.0. That peak level is the POC (Point of
Control) - the single highest-probability price. Cloud opacity and colour are
driven by each level's normalised density.
◆ Value Area
Starting at the POC, the algorithm expands outward, each step absorbing the
denser of the two neighbouring levels, until the enclosed density reaches the
Value Area % of the total (default 70). The price extent reached becomes the
Value Area High and Low.
◆ Gradient Rendering
Each density band of the cloud is drawn as a horizontal box tinted by a
two-colour gradient: the Low Density Color at thin levels through to the High
Density Color at the POC, with opacity ramping in parallel. Adjacent bands tile
continuously, so the cloud reads as a smooth heat-map rather than discrete
blocks. The same gradient drives the right-side density profile, whose width
per level scales with density - at the default resolution the edge reads as a
near-smooth wave while keeping the per-level gradient colour.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ WHAT MAKES IT DIFFERENT
◆ Continuous Density, Not Bins
Standard volume / price profiles split price into discrete bins, so the result
depends heavily on bin size and shows hard edges. KDE produces a smooth
continuous curve - no bin-edge artefacts, no arbitrary bucket count, just the
true shape of where price has traded.
◆ Auto-Adaptive Bandwidth
Silverman's rule sizes the smoothing from the instrument's own volatility and
sample size. The clouds stay meaningful on BTC, EURUSD, gold or an index with
the same default settings.
◆ Value Structure In One View
POC, Value Area High / Low and the full density shape are all on the chart at
once, with a matching side profile - the complete market-profile read without a
separate pane or a session reset.
◆ Premium Gradient Visual
A smooth two-colour density gradient behind the candles with parallel opacity
ramp, a clean dashed POC, dotted value-area lines, and a right-side profile
histogram. The clouds sit behind price as context and never clutter the read.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ DASHBOARD
Real-time panel (top right) with the current value read:
- POC - price of the highest-density level
- Value Area High - upper bound of the value area
- Value Area Low - lower bound of the value area
- Price Zone - whether price is Above Value, In Value, or Below Value
- Lookback - bars used to build the distribution
Legend table (bottom left) explains every colour. Both panels toggle in the
Dashboard settings.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
▸ SETTINGS
Engine
- Lookback Period - 200 (bars used to build the price distribution)
- Resolution - 120 (number of horizontal density bands; higher = smoother gradient and profile edge, up to 200)
- Bandwidth Multiplier - 1.0 (smoothness; 1.0 = Silverman auto, higher = broader clouds)
- Value Area % - 70 (percentage of total density that defines the value area)
Visualization
- Low Density Color - blue (thin / inefficiency end of the gradient)
- High Density Color - orange (dense / value end of the gradient)
- POC Line Color - near-white (high contrast against the dense orange cloud the POC sits in)
- Min Cloud Opacity - 8 (opacity of the lowest-density band; keeps empty zones faint)
- Max Cloud Opacity - 65 (opacity of the POC band)
- Show POC Line - ON
- Show Value Area - ON (dotted Value Area High / Low lines)
- Value Area Highlight - ON (boosts band opacity inside the value area so the 70% core pops)
- Show Side Profile - ON
- Profile Outline - ON (thin bright line tracing the right edge of the profile for a crisp silhouette)
- Cloud Forward Extend - 10 (bars the clouds extend right of the last bar)
Dashboard
- Show Dashboard - ON
- Dashboard Position - Top Right
- Show Legend - ON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best regards,
EXCAVO
Disclaimer
Trading involves significant risk. This indicator is a technical analysis tool
and does not constitute financial advice, investment recommendations, or a
guarantee of future results. Past indicator behavior does not guarantee future
performance. Always use proper risk management and your own judgment.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
👋 Trading since 2013 · TA & Indicators
TT - trading-tournaments.com/tournaments
Free analysis → t.me/+Qm96gDz3qdyNOs8t
Indicators → excavo.com/
🎓 Get EXCAVO Core,VIP, Academy → t.me/EXCAVOREFF_bot
TT - trading-tournaments.com/tournaments
Free analysis → t.me/+Qm96gDz3qdyNOs8t
Indicators → excavo.com/
🎓 Get EXCAVO Core,VIP, Academy → t.me/EXCAVOREFF_bot
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
👋 Trading since 2013 · TA & Indicators
TT - trading-tournaments.com/tournaments
Free analysis → t.me/+Qm96gDz3qdyNOs8t
Indicators → excavo.com/
🎓 Get EXCAVO Core,VIP, Academy → t.me/EXCAVOREFF_bot
TT - trading-tournaments.com/tournaments
Free analysis → t.me/+Qm96gDz3qdyNOs8t
Indicators → excavo.com/
🎓 Get EXCAVO Core,VIP, Academy → t.me/EXCAVOREFF_bot
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.