How It Works

An explanation of the concepts and data flow behind the paper-trading dashboard.

Educational only. These descriptions are conceptual. The exact implementation thresholds, logic, and order-routing details are not disclosed.

Core Concepts

TermConcept
Liquidity Sweep Price probes beyond a prior swing high or low and quickly reverses. The idea is that resting stop-loss orders clustered beyond the level get triggered, exhausting the last wave of momentum. The dashboard looks for a close back inside the prior range as a potential entry context.
Break of Structure (BOS) When price definitively moves beyond a recent swing point and continues in that direction, confirming the existing trend or signaling a trend change. Used as a filter to avoid fading the dominant move.
Fair Value Gap (FVG) A zone on the chart where price moved sharply, leaving a gap between consecutive candle wicks or bodies. In the context of this prototype, a retracement into the gap area may be watched for a potential reaction.
VWAP Volume-Weighted Average Price — the average price weighted by volume since market open. Used as a dynamic intraday reference level. Price above VWAP may suggest bullish bias; price below may suggest bearish bias.
EMA20 20-period Exponential Moving Average. A short-term trend-following indicator plotted on the chart for context.
Prior-Day High/Low The highest and lowest prices from the previous trading session. These levels often act as psychological support/resistance and are used to identify sweep targets.
Opening Range The high and low established during the first few minutes after market open. A breakout or sweep of the opening range can serve as an early-session context filter.
Watch Zone vs. Confirmed Signal A watch zone is displayed when price approaches a prior level but has not yet shown confirmation. A confirmed signal includes additional bar-structure checks (e.g., a rejection candle, BOS confirmation, FVG alignment) before an entry is considered.
Completed Minute Bars The strategy makes decisions only on fully completed one-minute bars, not on live ticks. Live ticks update the chart visuals in real time but do not trigger signal evaluation.

Data Flow

  1. Market Data Ingestion — The Python backend connects to the Alpaca Markets API for historical and real-time bar data. Each configured symbol (e.g., SPY, QQQ) is polled on a configurable interval (default every 15 seconds).
  2. Bar Processing — Completed one-minute bars are cached and evaluated. For each bar, the strategy computes swing points, checks for prior-level proximity, and scores the bar against the liquidity-sweep / BOS / FVG criteria.
  3. Watch Zone Detection — If price trades near a prior high or low beyond a small tolerance (conceptually ~0.015%), the dashboard displays a watch-zone indicator on the chart with a directional hint (e.g., "watch SELL after rejection" above prior high).
  4. Signal Confirmation — When additional conditions align (rejection candle, BOS confirmation, FVG retracement within zone), a confirmed signal is generated with an entry price, stop-loss distance, target level, and confidence score. The chart shows projected lines and a reward/risk visualization.
  5. Paper Order Submission — If trading is enabled and all risk guards pass, a bracket order (limit entry + stop-loss + take-profit) is submitted to the Alpaca paper-trading API.
  6. Journaling — Every signal, guardrail rejection, and order event is written to a local journal file for session review.

Dashboard Architecture

The application consists of two main layers:

The Electron app launches the Python watcher in the same terminal, so all Python logs and errors remain visible alongside the chart window.

Limitations

Paper trading only. The scaffold does not support live-market trading. Orders submitted are simulated by the Alpaca paper environment. Past screening results or backtest outcomes do not guarantee future performance.