Skip to main content
Platform overview

Platform Technology

AI engine, execution infrastructure, and monitoring.

Every component in the BabahAlgo technology stack is purpose-built for automated trading. There are no general-purpose frameworks, no shared hosting, and no third-party signal dependencies. The system owns the full pipeline from analysis to execution.

Market Data14 InstrumentsMulti-timeframeH4 → H1 → M15 → M5AI EngineGemini 2.5 Advisor6 Confluence StrategiesSMC · Wyckoff · AstroRisk Layer12-Layer ProtectionDynamic Lot SizingKill Switch · DD GuardMT5 ExecutionZeroMQ Bridge<2ms Latency24/7 ExecutionZero-Trust Architecture · Cloudflare Tunnel · VPS Isolation

< 50ms

Latency

99.9%

Uptime

24/5

Operation

Multi

Region

Analysis Engine

AI Advisor

Gemini 2.5 Flash Integration

The AI advisor uses Google's Gemini 2.5 Flash model to perform real-time market analysis for each monitored instrument. Every 15 minutes, the system submits a structured prompt containing current OHLCV data, recent price action context, active position state, and recent trade history. The model returns a JSON-structured response with directional bias, confidence score, key support and resistance levels, timeframe-specific analysis, and risk commentary.

Confidence scoring operates on a 0-100 scale. Scores below 70 suppress new entries for the pair. Scores between 70-80 require full multi-timeframe technical confluence. Scores above 80 allow entry with reduced confluence requirements. A neutral bias reading pauses all new entries regardless of technical signals.

15 min

Analysis cycle

14 pairs

Monitored instruments

0-100

Confidence scoring

Order Routing

Execution pipeline

ZeroMQ Bridge

Order routing between the strategy engine and MetaTrader 5 is handled by a custom ZeroMQ bridge. ZeroMQ is a high-performance asynchronous messaging library that provides socket-level communication without the overhead of HTTP or REST protocols. The bridge serializes trade commands (open, modify, close) into compact binary messages and transmits them to the MT5 expert advisor via TCP sockets on localhost.

Measured end-to-end latency from signal generation to order submission is consistently below 2 milliseconds in production. This includes message serialization, socket transmission, deserialization, and MT5 order queue insertion. Actual fill latency depends on broker infrastructure and is typically 50-200ms additional.

<2ms

Bridge latency

TCP/localhost

Transport protocol

MetaTrader 5 Integration

The MT5 expert advisor operates as a lightweight order executor. It receives commands from the ZeroMQ bridge, validates them against the broker's trading conditions (symbol availability, margin requirements, trading hours), and submits them to the broker's liquidity pool. Position management -- including stop-loss modification, trailing stop ratcheting, and forced closure -- is handled entirely through the bridge. The EA maintains no independent trading logic, ensuring the strategy engine is the single source of truth.

System Architecture

Infrastructure

Zero-trust architecture

All network access to the trading infrastructure is routed through Cloudflare Tunnel. There are no open ports, no public IP addresses exposed, and no direct SSH access from the internet. Administrative access requires Cloudflare Access authentication with hardware key verification. The tunnel provides DDoS protection, TLS termination, and access logging as a byproduct of its architecture.

VPS isolation

The trading engine runs on a dedicated VPS with no shared tenancy. The server is provisioned with guaranteed CPU cores, dedicated RAM, and SSD storage to eliminate resource contention. The operating system is hardened with minimal attack surface -- only the services required for trading operation are installed and running.

PostgreSQL and Docker

All trading state -- positions, signals, risk parameters, audit logs, account metrics -- is persisted in PostgreSQL. The database provides ACID compliance, point-in-time recovery, and structured query capability for post-trade analysis. The entire application stack is containerized with Docker, enabling reproducible deployments, version-locked dependencies, and rapid rollback in the event of a deployment issue.

Operations

Monitoring

24/7 health checks

Automated health checks run every 60 seconds, verifying connectivity to the broker, ZeroMQ bridge responsiveness, database availability, AI advisor reachability, and system resource utilization. Any check failure triggers an immediate alert to the operations team and initiates a pre-defined response protocol.

Kill-switch mechanism

A hardware-level kill switch can halt all trading activity within seconds. When activated, the system closes all open positions at market, cancels all pending orders, and disables the strategy engine. The kill switch can be triggered manually through the admin dashboard, automatically by the catastrophic breaker risk layer, or remotely via an authenticated API endpoint.

Audit logging

Every action in the system is logged with a timestamp, actor identification, action type, and full payload. This includes trade signals generated, risk checks passed/failed, orders submitted, fills received, position modifications, and administrative actions. Logs are stored in PostgreSQL with a 90-day online retention and archived to cold storage for compliance purposes. All logs are available for query through the admin dashboard.