MarketMind AI cover

Projects / MarketMind AI

LiveTrading Analytics

MarketMind AI

A MetaTrader 5 market analysis system that combines an MQL5 Expert Advisor, a Python desktop pipeline, KNN historical matching, and LLM synthesis to produce structured trading context without automated execution.

Overview

MarketMind AI is a MetaTrader 5 decision-support system for traders who want deeper market context before taking a trade. The platform combines an MQL5 Expert Advisor that harvests chart state with a Python desktop application that validates the request, enriches it with historical and macro context, and returns an AI-generated market narrative.

The app focuses on analysis rather than execution. It surfaces bias, structure clarity, volatility conditions, sentiment, historical analogues, and actionable summaries while leaving final trade decisions under the trader's control.

Architecture

Four components:

  1. MT5 Expert Advisor - MQL5 chart-side interface for collecting price action, indicators, institutional structure, Fair Value Gaps, sentiment inputs, and user-selected analysis profiles
  2. File-based IPC layer - shared MarketMindAI folder workflow that moves requests through inbox, processing, result, and error states using atomic file operations
  3. Python analysis pipeline - background processing service that validates payloads, runs historical matching, gathers optional news and macro context, and prepares structured prompts
  4. Desktop dashboard - PyQt5 interface for API configuration, live pipeline status, result review, metadata, and detailed analysis panels

Implementation

The Python application watches the MT5 communication folder with an event-driven file watcher, then moves each request into a processing state before analysis begins. This prevents duplicate reads and keeps malformed or failed requests quarantined for audit instead of crashing the app.

Incoming payloads are validated with Pydantic schemas before any inference call is made. The pipeline then combines technical chart context, symbol metadata, KNN historical analogues, optional Profit.com news data, and configured analysis profiles into a structured inference request.

MarketMind supports multiple AI providers through a shared inference layer, including OpenAI, Anthropic Claude, Google Gemini, and a mock provider for local testing. Responses are normalized into predictable JSON so the UI can display confidence, directional bias, risks, invalidation notes, and actionable summaries consistently.

Analysis Engine

The analysis engine is designed to give traders a fuller read of market conditions instead of a single buy-or-sell signal. It evaluates trend posture, structural clarity, volatility regime, market bias, support and resistance context, and technical confluence across the data exported from MT5.

The KNN module compares the current market state against historical contexts to find similar setups and summarize how those analogues behaved afterward. This gives each AI narrative a statistical reference point rather than relying only on the current candle snapshot.

Reliability

MarketMind keeps the UI responsive by running file watching and analysis work off the main dashboard thread. Each request is treated as an isolated job with explicit validation, logging, result persistence, and failure handling.

API keys follow a bring-your-own-key model for OpenAI, Anthropic, and Gemini. Users can choose whether credentials are saved locally or kept in memory, and the system avoids automated trade placement so the application remains a market-context tool rather than an execution engine.

Screenshots

1
MarketMind AI screenshot 1