Appearance

Personalize your experience

Mode
Accent Color
Direction
Sub-Microsecond C++20 Quant LanguageQuaScript logo

Quascript

6.5ns – 59.6ns per bar execution · Up to 156.4M bars/sec · Zero-GC arena memory · AVX2 SIMD acceleration · Direct WebGL 2.0 streaming. Self-hostable C++20 core.

Eliminate JVM and JavaScript garbage collection freezes. Designed for high-frequency trading, backtesting, and institutional charting.

0.5 ns

Peak Bar Execution (156M bars/s)

0 Bytes

Heap Allocation (Zero-GC)

0.4M

Bars / Sec Peak Throughput

0.6 µs

Live Forming-Bar Tick Latency

Live Execution Engine

Wrapped Quatick Core & Live QuaScript Demos

Every indicator executes directly inside the real wrapped @quatick/quatick-charts engine. Switch real algorithms, inspect pure QuaScript AST code, and observe sub-microsecond zero-GC execution in real time.

Microarchitectural Flow

End-to-End Execution Pipeline

How QuaScript transforms source code into hardware-vectorized WebGL 2.0 primitives in sub-microseconds.

STAGE 01
Tick Ingestion
100k ticks/sec WebSocket / IPC
< 10 μs
STAGE 02
Lookahead Lexer
Deterministic 1-char lookahead peek
48M lines/s
STAGE 03
AST Lowering
Constexpr static hash lookup table
0.00 ns runtime
STAGE 04
Threaded VM
Direct opcode dispatch (goto *I)
32.8 ns / bar
STAGE 05
SoA AVX2 Arena
64-byte L3 cache-line aligned buffer
0 GC Pauses
STAGE 06
WebGL 2.0 VBO
Direct GPU hardware unpack in shader
120 FPS
// Zero Serialization Bottleneck: Binary Memory Highway
Market Stream (Binary POSIX FIFO)
      │
      ▼
[quascore C++20 VM Core] ──► Evaluates Indicators into 64-byte L3 Cache Lines (Zero Heap Strings)
      │
      ▼ Direct POSIX Shared Memory (/dev/shm/quatick_vbo_0)
[Browser WebGL 2.0 Surface] ──► Uploads 32-bit uint directly into Instanced Vertex Buffer (120 FPS)
Visual Ergonomics & Photometrics

The 12 Spectral Bands Standard

Optical wavelength dispersion mapped directly to market structures. 44 calibrated families across 11 precision luminance steps (484 constants) eliminate eye fatigue on multi-monitor trading desks.

INTERACTIVE COLOR ENGINE

484 Calibrated Color Constants Matrix

Hover squares to inspect · Click to copy
700 nm (Long Infrared)380 nm (Near Ultraviolet)
680nm620nm580nm550nm515nm490nm460nm435nm410nm390nmBronzeSlate
ros
red
ora
cor
amb
yel
cha
lim
gre
eme
tea
cya
sky
blu
ind
vio
pur
plu
fuc
pin
bro
sto
sla
zin
Luminance 50 (Highlight)Luminance 950 (Deep Shadow)
BAND 01

Reds & Rubies

Stop-Loss Breaches & Invalidation

Wavelength650 – 700 nm
BAND 02

Corals & Oranges

Volatility Squeeze & Warning

Wavelength600 – 640 nm
BAND 03

Golds & Yellows

VWAP Anchors & Equilibrium

Wavelength570 – 590 nm
BAND 04

Lime & Chartreuse

Momentum Breakouts & Impulse

Wavelength535 – 565 nm
BAND 05

Greens & Mints

Bullish Trend Confirmation

Wavelength500 – 530 nm
BAND 06

Teals & Cyans

Order Flow Delta & Volume Absorption

Wavelength480 – 500 nm
BAND 07

Cool Blues & Sky

Baseline Moving Averages

Wavelength450 – 475 nm
BAND 08

Indigos & Violets

Multi-Timeframe HTF Anchors

Wavelength420 – 445 nm
BAND 09

Purples & Plums

Oscillators & Dynamic RSI

Wavelength400 – 420 nm
BAND 10

Pinks & Magentas

Options Gamma & Volatility Spikes

Wavelength380 – 400 nm
BAND 11

Earth & Bronze

Commodity Spreads & Fixed Income

WavelengthWarm metals
BAND 12

Achromatic Neutrals

Subdued Scales & Grid Planes

WavelengthBroadband
Compile-Time Constant LoweringAll 484 color tokens compile directly into packed 32-bit uint32 RGBA immediates (0xAABBGGRR) during AST lowering with 0 nanoseconds and 0 heap bytes allocated at runtime.
plot(invalidation, color=color.rose.500, width=2.0)
Full Engine Spec

Core Engine Capabilities

Engineered from scratch in C++20 for high-frequency algorithmic finance.

C++20 Bytecode Engine

Direct threaded opcode dispatch (goto *I->handler) executing at an unprecedented 32.8 to 60.2 nanoseconds per historical bar.

0.00ns Constant Folding

All 484 color constants and numeric literals resolve during AST lowering into immediate registers with exactly 0 bytes allocated.

AVX2 SIMD Acceleration

Vectorized non-temporal streaming writes (_mm256_stream_si256) flushing 8 bars of color data per CPU clock cycle.

Zero Garbage Collection

Eliminates the 15ms–80ms Stop-The-World GC freezes of JavaScript and JVM runtimes using power-of-two circular memory arenas.

484 Native Color Constants

44 calibrated color families across 11 precision luminance shades (50 to 950), optically balanced for dark-mode terminals.

Dual-Backend Graphics

Synchronized dual-surface stacking: WebGL 2.0 instanced shaders for 1M+ points at 120 FPS plus Canvas 2D for crisp typography.

Structure-of-Arrays (SoA)

64-byte L3 cache-line aligned memory layout ensuring 100% cache utilization and eliminating false sharing across CPU cores.

Lookahead Bias Prevention

Strict bar-by-bar execution semantics: orders placed on bar close fill strictly at the next bar's Open, preventing simulation leakage.

Historical Indexing [n]

Sub-nanosecond circular buffer lookback: close[1], high[5], and ta.highest(high, 100) execute without memory reallocation.

POSIX Shared Memory IPC

Zero-copy ring buffer communication via /dev/shm delivering sub-400ns IPC between execution sidecars and web terminals.

Parameter Sweep Engine

Multi-threaded parallel parameter optimization testing millions of parameter permutations across historical datasets in seconds.

Direct HFT Broker OMS

Native C++ execution bridge to Zerodha Kite, Interactive Brokers, Binance, and institutional FIX gateways with sub-millisecond routing.

Language Toolchain

Production Code Examples

Write indicators in QuaScript or embed the C++20 engine directly in your trading daemon.

Full Language Docs
1
//@indicator overlay=true render=canvas name="Adaptive Supertrend"
2
period = input(10, "ATR Period")
3
multiplier = input(3.0, "ATR Multiplier")
4
 
5
atr_val = ta.atr(period)
6
up_band = hl2 - (multiplier * atr_val)
7
dn_band = hl2 + (multiplier * atr_val)
8
 
9
var trend_dir = 1
10
trend_dir := close > dn_band[1] ? 1 : (close < up_band[1] ? -1 : trend_dir[1])
11
 
12
c_bull = color.emerald.500
13
c_bear = color.crimson.600
14
st_color = trend_dir == 1 ? c_bull : c_bear
15
 
16
render.line.canvas(trend_dir == 1 ? up_band : dn_band, "Supertrend", color=st_color, width=2.0)
17
candle_color(trend_dir == 1, color=c_bull, color=c_bear)
main
Ln 17, Col 1QUASCRIPT
Empirical Engine Profiling

Performance Benchmarks Under Real Workloads

Comprehensive empirical measurements executed on Darwin arm64 with release binary across scaling history, full output series generation, and live streaming market ticks.

156.4M bars/s

Peak Throughput

6.5 ns / bar (empirical release bench)

0.00 Bytes

Runtime Memory

Zero heap allocations (Zero-GC circular arenas)

1.6 µs p50

Live Tick Latency

Sub-20µs roundtrip websocket worker

0.0% Drift

Scale Stability

Constant O(1) latency from 1M to 10M bars

Empirical Benchmark Suite

Condition 1: Compute-only throughput (ns/bar) evaluated across 1M, 5M, and 10M bars.

Preset AlgorithmDomain1M Bars5M Bars10M BarsPeak ThroughputScale Drift
Volume Profile (Visible Range)
volume/volume_profile.qs
Volume & Flow6.5 ns6.3 ns6.4 ns
156.4 M/s
1.00x
On-Balance Volume (OBV)
volume/obv.qs
Volume & Flow12.2 ns12.2 ns11.9 ns
84.0 M/s
1.00x
Reference Levels
charts/reference_levels.qs
Trend28.2 ns28.2 ns28.2 ns
35.4 M/s
1.00x
Average True Range (ATR)
volatility/atr.qs
Volatility28.4 ns27.8 ns28.5 ns
35.1 M/s
1.00x
Volume Oscillator
volume/volume_osc.qs
Volume & Flow29.0 ns29.1 ns28.2 ns
35.5 M/s
1.00x
Volume & Orderflow Tape
charts/volume_and_orderflow.qs
Volume & Flow31.8 ns31.7 ns32.2 ns
31.1 M/s
1.00x
Simple Moving Average (SMA)
ma/sma.qs
Moving Average39.3 ns39.3 ns39.2 ns
25.5 M/s
1.00x
Rate of Change (ROC)
momentum/roc.qs
Momentum40.1 ns40.7 ns41.0 ns
24.4 M/s
1.00x
Lines & Catmull-Rom Splines
charts/lines_and_splines.qs
Trend43.1 ns41.0 ns41.9 ns
23.9 M/s
1.00x
Exponential Moving Avg (EMA)
ma/ema.qs
Moving Average46.1 ns47.0 ns46.9 ns
21.3 M/s
1.00x
Keltner Channels
trend/keltner_channels.qs
Trend47.1 ns45.9 ns46.0 ns
21.7 M/s
1.00x
Relative Strength Index (RSI)
momentum/rsi.qs
Momentum47.7 ns47.9 ns48.2 ns
20.7 M/s
1.00x
Average Directional Index (ADX)
trend/adx.qs
Trend48.5 ns48.6 ns48.5 ns
20.6 M/s
1.00x
Volume Weighted Avg (VWAP)
volume/vwap.qs
Volume & Flow53.2 ns52.9 ns53.7 ns
18.6 M/s
1.00x
MA Ribbon 4-Avg Suite
ma/ma_ribbon.qs
Moving Average56.8 ns56.6 ns56.9 ns
17.6 M/s
1.00x
EMA Cross Execution Bot
bot/ema_cross_bot.qs
Strategy & Bot57.7 ns59.6 ns62.5 ns
16.0 M/s
1.08x
Candlesticks & Bar Formats (7 Plots)
charts/candlesticks_and_bars.qs
Trend59.4 ns59.2 ns57.8 ns
17.3 M/s
1.00x
Supertrend ATR Cloud
trend/supertrend.qs
Trend59.6 ns62.0 ns59.1 ns
16.9 M/s
1.00x
MACD Velocity & Histogram
momentum/macd.qs
Momentum75.8 ns75.7 ns76.1 ns
13.1 M/s
1.00x
Bollinger Squeeze Bands
volatility/bollinger_bands.qs
Volatility86.8 ns86.1 ns85.2 ns
11.7 M/s
1.00x
Ichimoku Kumo Cloud (5 Lines)
trend/ichimoku_cloud.qs
Trend95.8 ns97.3 ns96.7 ns
10.3 M/s
1.00x
Trend Breakout OMS Strategy
strategy/trend_breakout_atr.qs
Strategy & Bot119.4 ns118.2 ns120.8 ns
8.3 M/s
1.01x
Liquidity Sweeps & FVG
smc/liquidity_sweeps.qs
SMC & Stats143.0 ns138.1 ns142.4 ns
7.0 M/s
1.00x
Multi-Grid HFT Trading Bot
bot/grid_bot.qs
Strategy & Bot152.0 ns167.8 ns186.6 ns
5.4 M/s
1.22x
TTM Squeeze Breakout Strategy
strategy/squeeze_breakout.qs
Strategy & Bot194.7 ns197.8 ns193.6 ns
5.2 M/s
1.00x
8-Oscillator Momentum Matrix
momentum/momentum_matrix.qs
Momentum223.4 ns223.8 ns229.6 ns
4.4 M/s
1.03x
Market Structure Zone Objects
smc/market_structure_zones.qs
SMC & Stats908.1 ns913.7 ns934.0 ns
1.1 M/s
1.03x
Hurst Exponent R/S Regime Window
stats/hurst_regime.qs
SMC & Stats1201.9 ns1194.9 ns1195.2 ns
0.8 M/s
1.00x
Steady-clock Darwin arm64 release bench (`quas bench --synth 1000000 --runs 3`). Zero heap allocations per bar.
Sub-50ns typical · 1M to 10M bars O(1) flat

Architecture Overview

Data & Ingestion

Zero-copy POSIX FIFO shared memory. High-frequency broker WebSocket ingestion feeds 100,000 ticks/s directly into ring buffers.

Compute Core

Threaded C++20 virtual machine dispatch. AVX2 SIMD acceleration. Zero-GC power-of-two circular memory arenas.

Render Pipeline

Dual-surface WebGL 2.0 instanced shaders and Canvas 2D overlays. Direct VBO binary ingestion locked at 120 FPS.

Ready to Build with QuaScript?

Start free. Full access to the C++20 toolchain, CLI, and real-time execution engine.

No credit card required · MIT license · C++20 Core