This expert advisor acts as a server bridge for MetaTrader 5, facilitating communication with external applications via ZeroMQ sockets and JSON messaging.
Mql5 Json Api enables remote control from languages like Python to request account details, trade history, and current positions. The system supports the execution of market and pending orders, as well as position modifications and partial closes. It features specialized sockets for system commands, data retrieval, live candle updates, and real-time transaction streaming, allowing for integration with external platforms like Backtrader.
Read from JsonAPI.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
z0
string
--- ZeroMQ Configuration ---
PROJECT_NAME
string
MQL5 JSON API
ZEROMQ_PROTOCOL
string
tcp
HOST
string
*
SYS_PORT
int
15555
DATA_PORT
int
15556
LIVE_PORT
int
15557
STR_PORT
int
15558
MILLISECOND_TIMER
int
1
a0
string
--- Add as many accounts as necessary ---
authAccounts
string
123456,123457,123458
Write here your trading accounts
o0
string
--- Options ---
Show all 20 inputs
Name
Type
Default
Description
o1
string
--- Wrtite to log file ---
writeLogFile
bool
false
o2
string
--- Information about an instrument ---
examine
string
EURUSD
o3
string
--- Print the account values every LOG_ACCOUNT minutes ---
logAccount
int
0
o4
string
--- Push last candle to liveSocket ---
liveData
bool
true
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone parrondo/mql5-json-api from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
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.
This library and example Expert Advisor provide an MQTT client interface for MetaTrader 5. It enables the platform to communicate with external MQTT brokers using version 3.1 or 3.1.1 protocols. The system supports both encrypted TLS and standard TCP/IP connections. Users can publish messages to specific topics and sub
This MetaTrader 5 expert advisor acts as a connectivity bridge between the MetaTrader platform and various cryptocurrency exchanges such as Binance, Bybit, and Bitmex. It allows traders to execute automated strategies on external crypto markets directly from the terminal. The included Ping Pong module functions as a ma
This expert advisor facilitates trade replication between MetaTrader 4 and MetaTrader 5 platforms using TCP communication. It functions as either a sender or a receiver, allowing cross-platform signal transfer. The tool includes a lot size multiplier to scale positions on the receiving side and requires IP and port con
This MetaTrader 4 expert advisor functions as a local trade copier, allowing users to replicate trades from one terminal to another. It operates by sharing a data file between a master and a slave instance on the same computer or filesystem. The slave EA manages order execution, including market, limit, and stop orders
This MetaTrader 4 utility acts as a bridge between custom technical indicators and Telegram channels for signal distribution. It monitors specific indicator buffers to identify trade entries and transmits alerts to a designated chat via the Telegram API. The tool is specifically configured for binary options workflows,
This MetaTrader 4 expert advisor functions as a trade copier, specifically acting as the slave component to receive and replicate orders from a source file. It features flexible lot sizing options, allowing users to apply a scaling coefficient, force a fixed lot size, or calculate volume based on the account balance. T