SCALABLE TRADING PLATFORMUnlimited VPS Operations

Centralized signal + orchestration, distributed execution, real-time monitoring, and VPS replication. Built for scale (multi-router, multi-local) with manual control when needed.

WebSocket RealtimeMaster–Router–LocalTelemetryVPS Replication
CANONICAL FLOW
Master → Routers (fan-out) → Locals (execute). Locals report status back to Routers. Routers push snapshots to Frontend. Frontend can monitor and send manual commands to all nodes.
Central Brain
Master VPS
Risk rules + orchestration
Execution Scale
Local VPS xN
MT5 execution + PnL control
Network Gateway
Router VPS xN
Fan-out + status relay
Control Plane
Frontend + API
UI commands + replication
Key Idea
Router-centric
Routers sit between Master and Locals: they distribute commands to execution nodes and aggregate status back to the UI.

SYSTEM ARCHITECTURE

Drop your diagram at public/architecture.jpg

Distributed Trading System Architecture
Legend: Signal → Master decision → Router distribution → Local execution → Router status → Frontend dashboard → Manual commands broadcast.

REALTIME FLOW

Each step is explicit—easy for partners to understand and easy for operators to verify.

STEP 1
realtime
1) CCI Indicator VPS → 2) Signal Socket VPS → 3) Master VPS
STEP 2
realtime
3) Master VPS → Router VPS (xN)
STEP 3
realtime
Router VPS (xN) → Local Trading VPS (xN) (MT5 Execution)
STEP 4
realtime
Local Trading VPS → Router VPS (Status/PnL)
STEP 5
realtime
Router VPS → Frontend VPS → Dashboard UI (Realtime Monitoring)
STEP 6
realtime
Dashboard UI → Manual Commands → Router VPS → All Local VPS
STEP 7
realtime
API/Replication VPS → Telemetry + VPS Replication (Scale unlimited nodes)

VPS RESPONSIBILITIES

Clear responsibilities by layer (Bacodo-style ops view).

Signal Generation

Layer 1
CCI Indicator VPS
VPS
Computes CCI + candle signals and emits real-time trading events.
Signal Socket VPS
VPS
Normalizes and pushes signals to Master (dedupe, real-time delivery, reliability).

Decision Engine

Layer 2
Master VPS
VPS
Orchestration + risk rules. Decides OPEN/CLOSE and distributes orders to Routers.

Distribution & Execution

Layer 3
Router VPS (xN)
VPS
Receives commands from Master → fans out to Locals. Aggregates status from Locals → pushes to Frontend.
Local Trading VPS (xN)
VPS
Executes MT5 orders, manages PnL/TP/SL locally, and reports status back to Router.

Monitoring & Control

Layer 4
Frontend VPS
VPS
Receives router snapshots/events and broadcasts real-time updates to the Dashboard UI.
Control / Manual Commands
VPS
Operator sends manual commands from UI → Router → broadcast to all Local VPS nodes.
API / Replication VPS
VPS
Telemetry + reports + VPS replication (add accounts, scale nodes, automate provisioning).
Operating Rules (System Fit)
Practical rules aligned with the Master–Router–Local design and realtime monitoring/control.
ops
Idempotency
Every OPEN/CLOSE command must be deduped by a unique id to prevent duplicate execution across Router/Local nodes.
Router-Centric Fan-out
Master never talks to every Local directly. Master → Routers, Routers → Locals. Routers also aggregate Local status and push snapshots to UI.
Realtime Visibility
Locals continuously report PnL/TP/SL + health → Routers. UI consumes router snapshots for monitoring and manual broadcast control.
Fail-Safe Control
Manual commands from UI must be broadcast via Router so an operator can stop/close/override consistently across all nodes.
Scale Unlimited Nodes
Replication/API layer should automate provisioning so you can add accounts/nodes without changing the core Master–Router–Local flow.
Next pages (dashboard-style)
Next pages you can add: /dashboard (realtime websocket), /nodes (router/local health), /trades (tickets), and /control (manual commands).