Appearance
Personalize your experience
Anchored VWAP Constellation
Admin's Choice NewFreeEight swing-anchored VWAPs and the buyers' cost band
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
- 11
- Lines of code
- 140
- Source
- presets/analysis/levels/anchored_vwap_constellation.qs
About
Eight volume-weighted average prices, each anchored at one of the last four confirmed swing lows (emerald family) and the last four swing highs (rose family). An anchored VWAP is the average price paid by everyone who traded since that swing, so it is where those buyers or sellers are break-even. Newer anchors are brighter; older ones fade. The cloud between the highest and lowest low-anchored lines is the buyers' cost band, coloured by how much of the constellation price is above. Reading: price above most lines = the recent crowd is in profit and tends to defend dips; price below most = trapped buyers become supply. A reclaim of the newest swing-high VWAP is the first sign that sellers since the last top are under water. Signals: reclaim of the newest swing-high VWAP, loss of the newest swing-low VWAP, full constellation support.
What it draws
Price overlay · counted from the engine's plot table and the script's draw calls
Series
- Line8 visible · 3 helperSwing low VWAP 4Swing low VWAP 3Swing low VWAP 2Swing low VWAP 1Swing high VWAP 4Swing high VWAP 3Swing high VWAP 2Swing high VWAP 1
- 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 140-line script (127 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 one loop (1 for). 17
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 2 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.
- • 11 plotted series
- • 1 band fill call
- • 5 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 above the VWAP anchored at the newest swing high
Close below the VWAP anchored at the newest swing low
Price is above every anchored VWAP
Settings
4 settings, grouped as in the chart's settings dialog
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Swing bars left | Integer | 8 | 2 – 50 | swing_bars_left |
| Swing bars right | Integer | 4 | 1 – 30 | swing_bars_right |
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Cross margin (ATR) | Number | 0.3 | 0 – 3, step 0.05 | cross_margin_atr |
| Bars between repeats | Integer | 20 | 1 – 500 | bars_between_repeats |
Script
packages/quascript/presets/analysis/levels/anchored_vwap_constellation.qs
Header
analysis "Anchored VWAP Constellation" {
overlay = true
render = webgpu
short_title = AVC
precision = 2
}- Total lines
- 140
- Code lines
- 127
- Comment lines
- 12
- Helper functions
- 0
- Loops
- 1
- Persistent variables
- 17
- Higher-interval feeds
- 0
- Engine plots
- 11
Built with
ta.atrta.bars_sinceta.pivot_highta.pivot_lowmath.coalescemath.is_namath.maxmath.minviz/premium
Discussion