Collection · MT4

Metatrader 4 MCP

by 8nite

This MetaTrader 4 expert advisor acts as a bridge for the Model Context Protocol (MCP), enabling remote interaction between the trading platform and external environments such as Claude Code.

GitHub stars20
Forks11
Last update1 year ago23 Jun 2025
LicenceNone stated

Overview

Metatrader 4 MCP provides real-time account data, market prices, and order management capabilities via an HTTP bridge and file-based reporting. The system allows users to place trades, manage positions, and monitor backtests remotely through a Node.js server. While the repository includes breakout strategy templates for development, the core functionality focuses on cross-platform communication, remote EA compilation, and comprehensive status tracking.

Details

Author

8nite on GitHub

Type

Collection

Platform

MetaTrader 4 (MQL4)

Markets

Forex, Gold, Oil & commodities

Timeframes

Any timeframe

Risk profile

No grid, martingale or hedging logic was found in its code or README. That says nothing about how it performs: backtest it first.

Input parameters

Read from MCP_Ultimate.mq4. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
UpdateIntervalint1000Update interval in milliseconds
EnableFileReportingbooltrueEnable enhanced file-based reporting
EnableBacktestTrackingbooltrueEnable backtest status tracking
EnableVisualModebooltrueShow MCP status on chart
EnableDebugModeboolfalseEnable debug logging
ReportsFolderstringmt4_reportsReports folder name
SaveDetailedLogsbooltrueSave detailed operation logs
EnableJSONFormatbooltrueUse JSON format for reports
MaxLogFilesint10Maximum log files to keep
TrackMajorPairsbooltrueTrack major currency pairs
TrackMinorPairsboolfalseTrack minor currency pairs
TrackExoticPairsboolfalseTrack exotic currency pairs
Show all 13 inputs
NameTypeDefaultDescription
TrackCommoditiesboolfalseTrack commodities (XAUUSD, XAGUSD, WTIUSD)

How to install it

  1. 1Download the sourceUse "Download source (.zip)" above, or clone 8nite/metatrader-4-mcp from GitHub, and unzip it.
  2. 2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL4/Experts.
  3. 3Copy the filesCopy the .mq4 file into Experts.
  4. 4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
  5. 5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.

Similar expert advisors

464 stars

This repository features a collection of trading tools for MetaTrader 5 and 4, headlined by a comprehensive Trade Manager EA. This manager enables manual execution via keyboard shortcuts and provides automated risk controls, including ATR-based break-even settings and trailing stops. The collection also offers strategy

MT4MT5 Collection BreakoutHedging
161 stars

This collection for MetaTrader 4 provides a variety of expert advisors and utilities intended for automated trading and educational use. The primary component is a moving average crossover robot that opens positions based on trend direction. It features risk management tools including percentage-based stop losses, take

MT4 Collection Indicator crossoverMartingaleGrid High risk

EA MQL4 Collection

by Yumerain
151 stars

This repository provides a diverse library of expert advisors and technical indicators for MetaTrader 4. The collection includes robots utilizing moving average crossovers, MACD trend-following signals, and mean-reversion strategies based on Bollinger Bands. A notable inclusion is a Martingale robot that scales lot siz

MT4 Collection Indicator crossoverTrend followingMartingale High risk
Updated 6 years ago None stated GitHub repository of EA MQL4 Collection
135 stars

This repository features a diverse collection of expert advisors and trading utilities for MetaTrader 4 and MetaTrader 5. It includes automated robots based on trendline analysis, session breakouts, and technical indicator crossovers using MACD, RSI, and Williams Percent Range. The library provides various tools for ri

MT4MT5 Collection Trend followingBreakoutGrid High risk
Updated 1 year ago None stated GitHub repository of Nkanven EA Collection
109 stars

LIVMOR is a MetaTrader 4 expert advisor found within this repository of over fifty automated trading tools. It utilizes technical indicators such as MACD, Stochastic, and moving averages to identify entry points, while also offering manual price entry options. The EA manages risk through user-defined stop loss and take

MT4 Collection Indicator crossoverMartingaleGrid High risk
Updated 8 years ago None stated GitHub repository of LIVMOR Trading Collection

FX Git Collection

by dennislwm
101 stars

This repository contains a diverse collection of MetaTrader 4 expert advisors and R-based financial scripts. The primary robot is based on the Nanningbob trading system, which utilizes multi-timeframe analysis across daily and four-hour charts to identify trends and ranging markets. It employs Bollinger Bands for mean-

MT4 Collection Trend followingMean reversionMartingale High risk
Updated 5 years ago None stated GitHub repository of FX Git Collection

More collections

Need a broker for MT4?

Compare regulated brokers that support MetaTrader, with spreads, minimum deposits and leverage side by side.

Compare brokers