A complete, build-ready specification that detects trading-signal patterns — harmonic, moving-average, momentum, breakout & volume — then fans an alert out across web, mobile, email, WhatsApp and Telegram, and on your approval routes the order into a paper or live trading account. Every pattern ships with a formula, a detection algorithm and a copy-paste "Claude task" so an agent can build it, module by module.
The live lab runs the real engine
(marketpulse/engine/, 22 passing unit tests) in your browser — generate candles,
detect signals, approve an alert, place a paper order. No build step, no backend.
A detected pattern flows down a strict pipeline — data to signal to alert to order.
Each layer speaks only through the shared Signal / Intent / Order
schemas, so you can add a new pattern or a new channel without touching the rest.
Real-time streams + historical OHLCV, normalised to Candle[]. Detectors act on closed bars only — no repainting.
Pure, deterministic detectors emit a Signal with direction, strength, geometry and evidence. Same code runs the backtester.
Confluence rules + filters, position sizing, and hard risk caps turn a signal into an Intent — or reject it.
Renders an Alert to web · mobile · email · WhatsApp · Telegram with Approve / Reject buttons. First response wins.
Idempotent (one clientOrderId = one fill, ever), builds brackets/OCO, drives the order lifecycle.
Same interface both ways: fill against the live feed (paper) or route to Alpaca / IBKR / Binance / Kite / Angel One (live).
Positions, P&L, reconciliation, append-only audit — then notify the outcome back to the same channels.
Signal.Every detector implements one interface and emits the same signal object — so the alert and execution layers never care which pattern fired. Highlighted chips are the ones named in the original brief; the rest extend the same engine.
Fibonacci-ratio XABCD reversal structures. Buy/sell at the final D point in the Potential Reversal Zone, confirmed by a reversal candle.
Geometry from swing pivots. The confirmed break is the signal; the projected height is the target.
Single/two/three-bar formations — used as confirmation at a level, gated by trend context.
Trend direction & pullback entries from SMA/EMA relationships.
Speed of price — overbought/oversold reclaims, line crosses and divergences.
Band bounces, squeezes, channel breakouts and volume confirmation + regime filters.
The same Alert object drives every channel. Approve on whichever you see
first — the response is idempotent across all of them, so an order can never be placed twice.
WebSocket + Web Push; live alerts inbox with Approve / Reject.
FCM / APNs with notification action buttons that deep-link in.
HTML with an inline chart; buttons are signed, single-use magic links.
Meta Cloud API template buttons or Twilio; signed inbound webhook.
Inline-keyboard buttons + slash commands: /positions /pause /kill.
Operate the whole system from chat — positions, pause/resume, mode, kill switch.
Every actionable button carries an HMAC token bound to the alert, action and user. Inbound webhooks are signature-verified. Unapproved alerts auto-expire.
Paper and live share one Broker interface — so paper mode is the integration
test for the entire pipeline, and going live changes a config flag, not the strategy code.
OrderUpdate a real venue does.clientOrderId — idempotent, no double-fills.The risk gate sits between signals and orders and is the most important code in the system. These defaults are baked into every module.
Each milestone is a paste-ready "Claude task" with acceptance criteria, ordered so nothing depends on code that doesn't exist yet. Paper trading works end-to-end at milestone 7.
Shared schemas + interfaces + Postgres with the idempotency index.
Historical backfill + real-time stream → Candle[].
Every formula, incremental & unit-tested, in one IndicatorBook.
MA · oscillators · volatility · volume · trend.
Harmonic · chart · candlestick.
Same detector code, historical feed — strategies become measurable.
Confluence rules turn signals into risk-checked intents.
Paper trading works end-to-end across the whole pipeline.
Rendered alerts + idempotent approve → order.
Chat-driven approve → order + control commands.
Live-shaped execution against paper endpoint, then gated live.
Paper→live gates, observability, secret hygiene, circuit breakers.
Interactive in-browser demo: generate candles → detect → approve → paper-fill.
Zero-dep indicator + detector library with 22 passing unit tests.
Overview, document map, safety defaults, how to drive it with Claude.
Layers, data flow, Signal/Order types, the Detector contract.
Harmonic, chart & candlestick — formulas, detection, entries.
MA, momentum, volatility/breakout, volume & trend — exact formulas.
Web · mobile · email · WhatsApp · Telegram + interactive approve → order.
Paper simulator + live broker adapters, idempotency, brackets, reconciliation.
Sizing, hard limits, kill switch, promotion gates, secrets, compliance.
12 milestones of paste-ready Claude tasks with acceptance criteria.