How ajokhai/exness_trading_bot works
Exness AI Autonomous Trading Agent is a browser-based MT5 trading interface. Users complete onboarding and connect MetaApi, configure markets and risk, then activate a recurring agent cycle: it checks account limits and spreads, gathers candles, computes indicators, requests parallel AI signals, aggregates them, and places qualifying trades. Dashboard panels expose positions, logs, settings, and emergency controls. The graph preserves these documented capabilities; several links are supported by the SOURCE INDEX or README rather than inspected implementation excerpts, so unsampled internals are not detailed.
Main entry points: loop.ts Agent Cycle · metaapi.ts MetaApi Bridge · Dashboard.tsx Trading Dashboard · agentStore.ts Agent State
Components 26
Setup and Dashboard
- Application Gate
src/App.tsx - Onboarding Wizard
src/components/wizard/OnboardingWizard.tsx - Trading Dashboard
src/components/dashboard/Dashboard.tsx - Agent Settings
src/components/dashboard/SettingsPanel.tsx - Decision Feed
src/components/dashboard/BrainFeed.tsx - Agent Header
src/components/dashboard/Header.tsx - Instrument Grid
src/components/dashboard/InstrumentGrid.tsx - Instrument Card
src/components/dashboard/InstrumentCard.tsx - Positions Table
src/components/dashboard/PositionsTable.tsx - Panic Controls
src/components/dashboard/PanicSuite.tsx
Agent Workflow
- Agent Cycle
src/services/agent/loop.ts - Market Indicators
src/utils/indicators.ts - Trade Sizing
src/utils/riskCalc.ts
AI Analysis
- AI Orchestrator
src/services/ai/engine.ts - Market Prompts
src/services/ai/prompts.ts - Signal Consensus
src/services/ai/aggregator.ts - Signal Context Types
src/types/signal.ts - AI Model Adapters
src/services/ai
Broker Integration
- MetaApi Bridge
src/services/exness/metaapi.ts - Liquidation Utility
src/utils/liquidation.ts
State and Risk
- Agent State
src/store/agentStore.ts - Trading Settings
src/store/settingsStore.ts - Account and Positions
src/store/tradingStore.ts - Credentials State
src/store/credentialsStore.ts
Other components
- Trader
- MetaApi Cloud / MT5
Connections 42
- Trader → Application Gate: opens
README.md - Application Gate → Onboarding Wizard: shows before setup
src/App.tsx - Application Gate → Trading Dashboard: shows after setup
src/App.tsx - Onboarding Wizard → MetaApi Bridge: initializes connection
src/components/wizard/OnboardingWizard.tsx - Trading Dashboard → Agent Settings: renders
src/components/dashboard/Dashboard.tsx - Trading Dashboard → Decision Feed: renders
src/components/dashboard/Dashboard.tsx - Trading Dashboard → Agent Header: renders
src/components/dashboard/Dashboard.tsx - Trading Dashboard → Instrument Grid: renders
src/components/dashboard/Dashboard.tsx - Trading Dashboard → Positions Table: renders
src/components/dashboard/Dashboard.tsx - Trading Dashboard → Panic Controls: renders
src/components/dashboard/Dashboard.tsx - Instrument Grid → Instrument Card: renders
src/components/dashboard/InstrumentGrid.tsx - Agent Settings → Agent Cycle: starts or stops
src/components/dashboard/SettingsPanel.tsx - Agent Settings → Trading Settings: reads and updates
src/components/dashboard/SettingsPanel.tsx - Agent Settings → Agent State: reads and updates
src/components/dashboard/SettingsPanel.tsx - Decision Feed → Agent State: reads logs
src/components/dashboard/BrainFeed.tsx - Agent Header → Agent State: reads agent status
src/components/dashboard/Header.tsx - Agent Header → Account and Positions: reads account data
src/components/dashboard/Header.tsx - Positions Table → Account and Positions: reads positions
src/components/dashboard/PositionsTable.tsx - Panic Controls → MetaApi Bridge: cancels or closes
src/components/dashboard/PanicSuite.tsx - Panic Controls → Agent Cycle: stops agent
src/components/dashboard/PanicSuite.tsx - Agent Cycle → Trading Settings: reads configuration
src/services/agent/loop.ts - Agent Cycle → Agent State: checks status and logs
src/services/agent/loop.ts - Agent Cycle → Account and Positions: reads account and positions
src/services/agent/loop.ts - Agent Cycle → MetaApi Bridge: fetches spread and candles
src/services/agent/loop.ts - MetaApi Bridge → MetaApi Cloud / MT5: streams and trades
README.md - MetaApi Bridge → Account and Positions: updates quotes and account
src/services/exness/metaapi.ts - Agent Cycle → Market Indicators: computes market context
src/services/agent/loop.ts - Agent Cycle → AI Orchestrator: requests analysis
src/services/agent/loop.ts - Agent Cycle → Trade Sizing: sizes qualifying trades
src/services/agent/loop.ts - Agent Cycle → MetaApi Bridge: places qualifying trade
src/services/agent/loop.ts - AI Orchestrator → Market Prompts: builds model prompts
src/services/ai/engine.ts - AI Orchestrator → AI Model Adapters: queries parallel models
src/services/ai/engine.ts - AI Orchestrator → Signal Consensus: aggregates responses
src/services/ai/engine.ts - AI Orchestrator → Agent State: logs reasoning
src/services/ai/engine.ts - Market Prompts → Signal Context Types: uses market context
src/services/ai/prompts.ts - Signal Consensus → Signal Context Types: uses signal types
src/services/ai/aggregator.ts - AI Model Adapters → Credentials State: reads API keys
README.md - AI Model Adapters → MetaApi Cloud / MT5: calls AI providers
README.md - Onboarding Wizard → Credentials State: reads credentials
src/components/wizard/OnboardingWizard.tsx - MetaApi Bridge → Agent State: logs connection status
src/services/exness/metaapi.ts - Liquidation Utility → MetaApi Bridge: closes positions
src/utils/liquidation.ts - Liquidation Utility → Agent State: updates agent state
src/utils/liquidation.ts