Appearance
Personalize your experience
Volume Density Heatmap
Admin's Choice NewFreeRolling volume-at-price heatmap behind the candles with a live POC
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
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.
What it draws
Price overlay · counted from the engine's plot table and the script's draw calls
Series
- Line2 visible · 41 helperWindow highWindow low
- Step line1Point of control
- Band fills (render.band calls)1
Signal marks
Drawings and chart effects
- Dashboard tables1 created
How it runs
From source to the live chart, for this script
- 1Compile
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.
- 2Place
The header sets
overlay = true, so everything is drawn on the price chart, on the same scale as the candles. - 3Compute
The script runs once per bar, oldest to newest. Each bar also runs 3 loops (3 for). 2
persistvariables keep state (objects, counters) across bars. - 4Stay 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.
- 5Render
The results are handed to the chart: series on WebGPU, drawings on the Canvas 2D QuaScript layer.
- 6Tune
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
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.
- • 44 plotted series
- • 1 band fill call
- • 3 signal mark types
Chosen by render = webgpu in the header.
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.
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.
- • 1 dashboard tables (QuaScript layer)
Alerts
3 alert rules declared with alert.rule
Close back above the rolling point of control
Close below the rolling point of control
Price entered a low-volume cell
Settings
4 settings, grouped as in the chart's settings dialog
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Window (bars) | Integer | 120 | 20 – 600 | window_bars |
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Brightest at (x even) | Number | 2.5 | 1.2 – 6, step 0.1 | brightest_at_x_even |
| Cell transparency | Integer | 55 | 0 – 90 | cell_transparency |
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Low-volume gap (x even) | Number | 0.45 | 0.05 – 0.9, step 0.05 | low_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
ta.highestta.loweststat.summath.clampmath.floormath.is_namath.maxmath.minviz/premium
Discussion