Architecture
Inside CosmicTrade's Five-Agent Trading Desk: From Scan to Audit
See the autonomous trading agent architecture behind five specialists and a coordinator, from market screening to risk review and decision audits.

How does this trading-desk architecture work?
CosmicTrade’s autonomous trading agent architecture combines six roles: five specialists (Pulsar, Quasar, Horizon, Nova, and Nebula) and one Coordinator. The specialists screen markets across five Adaptive Liquidity Matrix lenses, draft and de-risk proposals, check deterministic risk limits, operate guarded orders on MetaTrader 5, and record structured post-trade lessons; the coordinator manages handoffs and overlap protection. “Five agents” refers to the specialists, not all roles. Separation supports auditability and fail-closed control, not guaranteed trading success.
Why separate the roles
If one agent scans the market, drafts an entry, approves its risk, and submits the order, the same reasoning both creates and validates the idea. Separation enables independent checks at critical boundaries—and pairs LLM reasoning with deterministic Python/SQLite guards that no model can override. Still, separate modules are not a substitute for explicit rules: risk limits, system state, live spread/volatility ceilings, and recorded decisions remain the basis of control. Automation cannot eliminate incomplete inputs or changing market conditions.
Five specialists and a coordinator
- Pulsar (Market Scout) scans five liquid instruments on weekdays (
XAUUSD,BTCUSD,USDJPY,GBPUSD,GBPJPY) andBTCUSDon weekends acrossM5andH1structure using the Adaptive Liquidity Matrix (ICT_PURE,ICT_VSA,ICT_WYCKOFF,ICT_AMT,ICT_SFP_STRAT). On every cycle—includingSTAND_ASIDE—Pulsar emits a 16:9 Multi-Pair Radar Board showing live spreads, mini-M5 candles, and H1 levels. - Quasar (Chart Strategist) first evaluates any resting pending orders for stale or invalidated setups (recommending cancellation if structure breaks), reads historical
crew_lessons, runs a single bounded pre-entry sparring check with Nebula, and then drafts a limit proposal with a dynamic 16:9 TradingView-style chart marking the active lens, FVG/entry zone, stop-loss (SL), and take-profit (TP). A proposal is a plan, not evidence that an order was executed. - Horizon (Risk Guardian) checks the maximum 2% per-trade risk, 4% simultaneous floating exposure, minimum R:R, and lot sizing through the deterministic SQLite risk ledger (
crew_ledger.db), locking a formal risk reservation before execution. These are eligibility controls, not risk targets. - Nova (Trade Operator) runs a deterministic local pre-send guard against live MT5 bid/ask quotes and stop geometry (rejecting
STALE_LIMIT_PRICEorINVALID_STOPSlocally without chasing price) and submits to MetaTrader 5 via the isolated broker helper only when the globalsubmission_switchisARMED. Nova also executes pending-order cancellations and releases unused risk reservations.ARMEDis an operational prerequisite, not a guarantee of price, execution, or outcome. - Nebula (Trade Mentor) supports two bounded feedback loops: pre-entry advisory sparring with Quasar based on
crew_lessons, and post-trade or post-rejection reflections triggered automatically by the 10-second Trade Lifecycle Monitor (FILLED,TP_HIT,SL_HIT,CLOSED,CANCELED). Lessons are persisted with source attribution and confidence bounds (LOWon single samples), and Nebula cannot alter risk limits or change a market outcome that already occurred. - Coordinator manages sequence, handoffs, and the overlap guard across 12 weekday Multi-Session Adaptive slots (Asia, London, Overlap/NY) and 4 weekend
BTCUSDslots—ensuring a candidate does not skip an unfinished stage or collide with an active cycle. (Internal Hermes profile IDs—ucup,bambang,mbak-sri,joko,mbah-tejo—remain mapped under the hood for ledger and cron continuity.)
A practical flow from scan to review
First, the Coordinator checks the overlap guard and opens a cycle snapshot. Pulsar filters instruments purely on technical microstructure (M5/H1 price action, tick_volume, real spread, and an m5_volatility_spike ceiling at 2.5× average M5 range—with zero macro or fundamental guessing). Even if every pair stands aside, Pulsar publishes the Radar Board and the cycle ends without waking downstream roles.
If a candidate qualifies, Quasar reviews any existing pending orders first (triggering a de-risking cancellation via Nova if a prior setup has gone stale), consults crew_lessons and Nebula in one advisory sparring round, and outputs structured levels plus a 16:9 chart. Horizon then evaluates the proposal against the risk ledger; a rejected proposal is halted immediately and cannot be forwarded as if approved.
Only an ALLOWED proposal with an active reservation reaches Nova's local pre-send guard and ARMED check before hitting MetaTrader 5. Once placed, the 10-second TradeLifecycleMonitor tracks the ticket through fill or exit, automatically releases the risk reservation upon closure, and records structured lessons for Nebula and future cycles.
At every stage, public and VIP Telegram broadcasts pass through assert_public_safe()—enforcing private-data redaction (no account balances, DEMO/REAL labels, or dollar amounts) and English-only consistency—while the web portal keeps live forward logs strictly separated from historical backtest replays. Alerts should still be read as information for review, not a quality guarantee or an invitation to copy a trade. See also how a Silver Bullet proposal is evaluated, why pure technical short-term execution wins, and the 2% risk and 4% exposure limits.
Common questions and automation limits
Are there five agents or six? There are five named specialists (Pulsar, Quasar, Horizon, Nova, Nebula) and one Coordinator, so the architecture has six roles in total.
Does `ARMED` mean an order is guaranteed to succeed? No. Even when ARMED, Nova's local pre-send guard can still block a stale or geometrically invalid order, and live prices, connectivity, broker rules, and market conditions still affect execution.
Does role separation guarantee error-free decisions? No. It enables clearer checks, deterministic guards, and audit trails, but every stage still depends on inputs, rules, and external conditions. A controlled process is not a guaranteed trading outcome.
Responsible use
This article describes a system workflow, not financial advice or a recommendation to copy orders. Leveraged trading is risky and can result in losses. Independently review information, risk limits, and broker terms; use only funds you can afford to put at risk. No agent architecture, backtest replay, or audit promises profit or a win rate.
Keep each handoff explicit and each guard deterministic: a recorded review makes decisions easier to inspect, not trades certain to succeed.

