ramseshk
5c41d232c1
Fix OBI depth map: single unified 3D surface, no subplots
...
- Single surface spanning -50 to +50 bps (bid left, ask right)
- Clean warm amber/gold colorscale with contour projection
- NaN/Infinity filtering on Z matrix for clean rendering
- ResizeObserver for responsive canvas sizing
- uirevision v2 for stable camera across updates
- Removed dual-subplot approach (single colorbar, single scene)
- Imbalance overlay: +0.051 style with wall detection + formula
- L2RingBuffer unchanged, l2SnapshotsToSurface produces 60-row matrix
2026-08-05 06:30:40 +00:00
ramseshk
7fd289f562
3D Order Book Depth Map: Plotly subplots (bid/ask split) + remove Three.js
...
- Replaced single surface with dual synchronized 3D subplots:
Left: BID depth (green colorscale, -50 to 0 bps)
Right: ASK depth (red colorscale, 0 to +50 bps)
- Independent colorbars per side with proper labeling
- Camera sync via scene anchor mirroring
- Contour projection on both surfaces
- Live imbalance overlay centered between subplots
Data pipeline:
- l2SnapshotsToDualSurface() splits bid/ask into separate matrices
- L2RingBuffer unchanged (60 snapshots, O(1) append)
Removed:
- depth-map-three.tsx (Three.js alternative)
- Engine toggle buttons from OBI detail
- Three.js CDN loading
2026-08-05 06:24:09 +00:00
ramseshk
8855c013a6
3D Order Book Depth Map: Plotly.js + Three.js live visualization
...
Architecture:
- depth-map-utils.ts: L2RingBuffer, l2SnapshotsToSurface, computeImbalance
└─ O(1) ring buffer, 60-snapshot capacity
└─ Surface matrix: ±50 bps × 100 resolution
└─ Imbalance formula: I = (V_b-V_a)/(V_b+V_a) with wall detection
- depth-map-plotly.tsx: Plotly.js 3D Surface
└─ 7-stop warm colorscale (dark→amber→gold)
└─ contour projection, ambient+diffuse lighting
└─ Live imbalance overlay: gauge bar + formula
└─ uirevision for stable camera on updates
- depth-map-three.tsx: Three.js high-perf alternative
└─ BufferGeometry + vertex colors + OrbitControls
└─ 60fps suitable, WebGL renderer with alpha
└─ Warm gradient matching Plotly colorscale
└─ Double-sided faces, dark grid helper
- obi-detail.tsx: Combined strategy detail panel
└─ Engine toggle: Plotly.js ↔ Three.js
└─ Synthetic data generation for testing
└─ 6-stat metrics row (PnL, BTC B&H, Sharpe, Hit Rate, Max DD, Signal)
└─ Equity curve comparison + trade history table
- Page integration: OBI strategy triggers dedicated 3D view
2026-08-05 06:11:33 +00:00