Appearance

Personalize your experience

Mode
Accent Color
Direction
Analysis Marketplace
QuaScript

Volume Density Heatmap

Admin's Choice NewFree

Rolling volume-at-price heatmap behind the candles with a live POC

Trendlines & LevelsPrice overlay WebGPU CanvasHybridDashboardSignalsAlerts
quascriptlevelsvolume-profileheatmappocliquidity

Favourites and Admin's Choice analyses are listed in the terminal's indicators window under Analysis Marketplace.

Language
QuaScript
Engine
Native C++, incremental on live ticks
Rendering
WebGPU + Canvas
Placement
Price overlay
Settings
4
Plots
44
Lines of code
80
Source
presets/analysis/levels/volume_density_heatmap.qs
Volume Density Heatmapengine result
Loading the engine result…
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

About

Where volume has traded recently, painted behind price. The range of the last `len` bars is cut into 20 horizontal cells; every bar, each cell gets the share of the window's volume traded at that price (each bar's volume is spread over its high-low range), relative to an even spread. Cells are coloured on an inferno ramp: transparent where little traded, glowing amber where volume concentrated. The line through the brightest cell is the rolling point of control. Reading: bright cells are high-volume nodes where price tends to stall and rotate; dark gaps are low-volume nodes that price crosses quickly. A close through the point of control changes who controls the auction; a break into a dark gap tends to run to the next bright cell. Signals: point-of-control reclaim / loss, entry into a low-volume gap.

44
Plotted series
3
Signal marks
1
Drawings
3
Alert rules
4
Settings
69
Lines of code

What it draws

Price overlay · counted from the engine's plot table and the script's draw calls

Series

  • Line2 visible · 41 helper
    Window highWindow low
  • Step line1
    Point of control
  • Band fills (render.band calls)1
Legend
Point of control Window high Window low

Signal marks

POC reclaimPOC lossLow-volume gap

Drawings and chart effects

  • Dashboard tables1 created

How it runs

From source to the live chart, for this script

  1. 1
    Compile

    The QuaScript compiler checks the 80-line script (69 lines of code) and lowers it for the native C++ engine. Compile errors point at the exact line and column.

  2. 2
    Place

    The header sets overlay = true, so everything is drawn on the price chart, on the same scale as the candles.

  3. 3
    Compute

    The script runs once per bar, oldest to newest. Each bar also runs 3 loops (3 for). 2 persist variables keep state (objects, counters) across bars.

  4. 4
    Stay live

    On the terminal the script keeps one live engine session: a tick rolls the forming bar back to its checkpoint and re-executes only that bar, and new bars are appended, so history is never rerun while the market moves. The live result is identical to a full run.

  5. 5
    Render

    The results are handed to the chart: series on WebGPU, drawings on the Canvas 2D QuaScript layer.

  6. 6
    Tune

    4 settings in 3 groups appear in the chart's settings dialog. Changing one reruns the engine with the new value.

Rendering

Hybrid: this script draws on 2 surfaces at once

WebGPUSeries renderer

The browser's modern GPU API. The chart uploads every line, band and mark of the script as GPU buffers and draws them in one pass, so dense heatmaps and dozens of series stay smooth while you pan and zoom. Without WebGPU support the chart's GPU layer falls back to WebGL 2, then Canvas 2D.

In this script
  • • 44 plotted series
  • • 1 band fill call
  • • 3 signal mark types

Chosen by render = webgpu in the header.

WebGLNot used

GPU drawing through WebGL 2, available in every current browser. Used for chart-native profiles and for series that ask for it with backend = "webgl". Fast for large numbers of bars and wide fills.

CanvasUsed

The browser's 2D drawing API. Text-heavy and object-style output (dashboard tables, zones, tags, segments), candle colors and backgrounds are painted by the QuaScript layer, a Canvas 2D surface over the chart. Series use Canvas when the script's header does not ask for a GPU.

In this script
  • • 1 dashboard tables (QuaScript layer)

Alerts

3 alert rules declared with alert.rule

POC reclaim

Close back above the rolling point of control

POC loss

Close below the rolling point of control

Low-volume gap

Price entered a low-volume cell

Settings

4 settings, grouped as in the chart's settings dialog

Profile
SettingTypeDefaultRange / optionsId
Window (bars)Integer12020 – 600window_bars
Style
SettingTypeDefaultRange / optionsId
Brightest at (x even)Number2.51.2 – 6, step 0.1brightest_at_x_even
Cell transparencyInteger550 – 90cell_transparency
Signals
SettingTypeDefaultRange / optionsId
Low-volume gap (x even)Number0.450.05 – 0.9, step 0.05low_volume_gap_x_even

Script

packages/quascript/presets/analysis/levels/volume_density_heatmap.qs

Header

analysis "Volume Density Heatmap" {
    overlay = true
    render = webgpu
    short_title = VDH
    precision = 2
}
Total lines
80
Code lines
69
Comment lines
10
Helper functions
0
Loops
3
Persistent variables
2
Higher-interval feeds
0
Engine plots
44

Built with

Technical analysis (ta.*)
ta.highestta.lowest
Statistics (stat.*)
stat.sum
Math (math.*)
math.clampmath.floormath.is_namath.maxmath.min
Imported modules
viz/premium

Discussion

Sign in to join the discussion. Your posts and replies show up on your profile.