Skip to content

Display gamma wall + VWAP on the Security Detail price chart (historical overlay, water-line fallback) #70

@JohnFunkCode

Description

@JohnFunkCode

What

Surface gamma wall and VWAP in the WebUI on the Security Detail view. Ideally plot their historical values as overlays on the price chart alongside price and the moving averages (the Price & MAs tab). Where a historical series isn't available, fall back to drawing the current value as a dashed horizontal "water line" across the price chart.

Why

Gamma wall (the MM hedging pivot) and VWAP are both strong contextual levels for reading a security's price action. They exist in the analysis layer but have no UI presence today. Overlaying them on the existing price/MA chart puts them where a user is already looking, and the historical series turns them into trend lines rather than single static numbers.

Two render modes

  1. Historical overlay (preferred): plot the time series of VWAP and gamma-wall strike as lines layered on the existing price + moving-average chart, so the user sees how each evolved with price.
  2. Water-line fallback: when no history exists for a symbol yet, draw the current VWAP / gamma-wall value as a dashed horizontal line on the chart (a "water line"), labeled with the value. This gives immediate value even before history accumulates.

Backend status — partial; history needs REST endpoints

  • Current values are already REST-exposed: VWAP via GET /api/securities/<ticker>/signals/technical; current gamma wall via GET /api/securities/<ticker>/signals/options-flow (delta-adjusted OI). These power the water-line fallback with no backend work.
  • The historical series are MCP-only — no REST yet: get_vwap_history and get_gamma_wall_history (both stock-price MCP tools) have no REST endpoint. Thin REST wrappers are needed before the historical overlay can be built (e.g. GET /api/securities/<ticker>/vwap/history, GET /api/securities/<ticker>/gamma-wall/history). The gamma_wall_history table already persists daily snapshots; VWAP history is computed.
  • History depth depends on the daily job (Add a daily cache-warming batch job (GCP) — refresh all cached data + build options chain history #68): gamma-wall history only grows if something snapshots it each trading day. Until the cache-warming job is running, many symbols will have little/no history — which is exactly why the water-line fallback matters.

Suggested placement

The Price & MAs tab already renders the price chart with moving averages — add VWAP and gamma-wall as additional toggleable series/lines there, rather than a new tab. Make each overlay independently toggleable so the chart doesn't get noisy.

Acceptance

  • VWAP and gamma wall visible on the Security Detail price chart
  • Historical overlay rendered when a series is available (layered with price + MAs)
  • Dashed "water line" fallback (current value) when history is absent, clearly labeled
  • Overlays are independently toggleable
  • REST history endpoints added for get_vwap_history / get_gamma_wall_history (if historical overlay is in scope)
  • Update docs/capabilities-matrix.md (closes WebUI gaps for these tools)

Related: #68 (daily cache-warming job builds the gamma-wall history), #67 (capabilities-matrix UI-gap audit), #69 (surfacing trade recommendation in the same detail view).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions