Elite Trading Technical Documentation
Comprehensive integration reference for institutional brokers, prop trading firms, and quantitative developers. Covers our stateless compute core, 5-point Risk Copilot, embeddable HTML5 Web Components, MetaTrader bridges, and Model Context Protocol server.
01. Three-Tier Institutional Architecture
Elite Trading is engineered with strict decoupling between offline asynchronous AI strategy discovery and zero-latency live runtime execution:
Deterministic Math
Stateless HMM regime inference, ATR expansion, Volume Profile VPOC, 5-point risk audits, and Seeded Latin Hypercube parameter sampling in sub-50ms with 15s in-memory TTL caching.
Multi-Tenant Metering
SHA-256 hashed API key authentication (sub-ms cache), tenant data isolation, rate limiting headers, and asynchronous audit ledger for billing reconciliation.
Embeddable Surfaces
HTML5 Web Components, interactive broker playground, MT4/MT5 EA WebRequest bridge, REST API Gateway, and Model Context Protocol (MCP) server for AI assistants.
02. Stateless Market State Provider
Located in server/market-state-provider.ts. Delivers real-time macro context on any symbol and timeframe without cron overhead or stateful connections.
- 3-State HMM Inference: Classifies into
risk_on_bull,risk_off_bear, orneutral_choppywith probabilistic confidence (0.00 – 1.00). - Trend & ADX Momentum: Evaluates EMA20/50 alignment and Average Directional Index (
ADX > 25indicates strong trend). - Normalized ATR Volatility: Normalizes ATR against spot price, classifying volatility into
contracted,normal, orexpanded. - Volume Profile VPOC: Computes 30-bin price distribution over lookback bars, identifying Volume Point of Control (VPOC), Value Area High (VAH), and Value Area Low (VAL).
03. Institutional Pre-Trade Risk Copilot
Located in server/risk-copilot-service.ts. The pre-trade audit engine evaluates pending trader order tickets against structural portfolio failure modes before execution:
Calculates normalized stop distance: |entry - SL| / ATR. Rejects stop losses tighter than 0.75 x ATR, eliminating immediate liquidation caused by normal bid-ask spread noise.
Ensures potential profit exceeds risk: |TP - entry| / |entry - SL| ≥ 1.0. Warns against negative mathematical expectancy.
Prevents counter-productive retail hedging traps (e.g. Long EURUSD while Short EURUSD open). Immediately sets Risk Score ≥ 80 (ORDER_BLOCKED).
Flags orders attempting to fade strong trends (ADX ≥ 25) without explicit mean-reversion tagging.
Detects currency cluster over-concentration (e.g. cumulative USD exposure across EURUSD and GBPUSD exceeding 3.0 units).
04. Turnkey HTML5 Web Components
Zero-dependency Custom Elements served from /embed/widgets.js. Can be embedded into any broker portal or web terminal with a single script tag:
05. MetaTrader 4 / MetaTrader 5 Bridge
Connects MT4/MT5 terminals directly to Elite Trading's pre-trade risk engine using native WebRequest(). Source code available at client/public/embed/EliteRiskCopilotBridge.mq5.
06. Model Context Protocol (MCP) Server for AI Copilots
Enables broker AI assistants (Claude Desktop, Cursor, in-house chatbots) to execute quantitative calculations via standardized JSON-RPC 2.0 (protocolVersion: 2024-11-05):
GET /api/v1/mcp/sse
get_market_regime, evaluate_trade_risk, get_validated_setups, query_strategy_catalog, and optimize_portfolio.
07. Seeded Latin Hypercube Sampling (LHS) Parameter Stability
Located in server/strategy-calibrator-service.ts. Eliminates data-snooping bias and curve-fitting traps:
- Stratified Multidimensional Exploration: Explores equiprobable parameter intervals across parameter space.
- Neighborhood Perturbations (±8%, ±12%): Tests performance degradation when parameters are perturbed. Rejects sharp "cliff-edge" spikes; confirms robust profit plateaus.
- 60/40 Walk-Forward Split: Partitions data into in-sample calibration and out-of-sample forward verification.
- Admission Threshold: Requires Parameter Surface Stability Score ≥ 0.70 before strategy admission into live shadow incubation.
08. B2B REST API Gateway Reference
Protected by SHA-256 hashed API keys passed via X-API-Key or Authorization: Bearer <key>:
| Method | Endpoint | Scope Required | Description |
|---|---|---|---|
| GET | /api/v1/health | (Public) | Engine health check and non-advisory declaration. |
| GET | /api/v1/market-state | market_state:read | Stateless HMM regime, trend, volatility, and VPOC. |
| POST | /api/v1/risk/evaluate-order | risk:evaluate | 5-point institutional pre-trade risk evaluation. |
| GET | /api/v1/strategies/live | strategies:read | Active high-conviction algorithmic trade setups. |
| GET | /api/v1/strategies/catalog | strategies:catalog | Strategy catalog with Seeded LHS stability scores. |
| POST | /api/v1/portfolio/optimize | portfolio:optimize | Multi-strategy HRP risk-parity allocation. |
| GET | /api/v1/brokers/me | (Authenticated) | Broker organization profile, tier, and remaining quota. |
| GET | /api/v1/brokers/usage | (Authenticated) | 30-day aggregated usage metrics and latency telemetry. |
09. Regulatory Safe Harbor & Compliance Blueprint
Elite Trading operates as a 100% Non-Advisory, Execution-Only Technology Provider under Kenya Capital Markets Authority (CMA) guidelines and international regulatory frameworks:
- No Personalized Financial Advice: Does not examine individual net worth, bank balances, or risk suitability questionnaires.
- Zero Fund Custody: Never touches client funds and never makes discretionary allocation decisions.
- Publisher / Research Exemption: Mathematical trading models and setups are generated uniformly across subscribers.
- Full Telemetry Logging: Every pre-trade check is cryptographically logged to provide a tamper-proof audit trail for regulatory examinations.