Copier & bridge · MT4

MySQL Trade Replicator

by femtotrader

This MetaTrader 4 expert advisor facilitates trade copying between separate accounts across different brokerages using a MySQL database as a bridge.

Archived by its author

GitHub stars38
Forks23
Last update8 years ago6 Jun 2018
LicenceBSD-2-Clause

Overview

MySQL Trade Replicator consists of a master script that records trades and a slave script that replicates them. The tool supports volume scaling via multipliers or fixed lot sizes, trade direction inversion, and the ability for a single slave to follow multiple master accounts simultaneously. It manages entry and exit synchronization through database polling, including slippage controls and retry mechanisms for trade execution.

Details

Author

femtotrader on GitHub

Type

Copier & bridge

Platform

MetaTrader 4 (MQL4)

Markets

Any symbol

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 mql4-mysql_trade_replicator_slave.mq4. Defaults are the author's; change them in the EA's Inputs tab.

NameTypeDefaultDescription
g_timezone_settingint3server time zone
g_slave_id_settingstringfVB472V9x8i4RN081pg8slave_id - a string of 20 symbols recommended id, use some passwords generator to obtain it http://strongpasswordgenerat
g_deposit_currency_settingstringUSDdeposit currency
g_slave_comment_settingstringslave01master comment
g_max_slippage_settingint10max splippage (points not pips)
g_subscribed_masters_settingstringn9o816RTuaxJt99WSfD8subscribed_masters is a list of masters in the form "master1 master2 master3" etc. (blank space between each master)
g_table_prefix_settingstringtrade_replicator_table prefix
g_logging_level_settingint0level of logging (0 display all - see toolbox code)
g_copy_mode_settingCopyModeCopyMode_FollowCopyMode - define how trade are copied
g_volume_sizing_mode_settingVolumeSizingModeVolumeSizingMode_MSVolumeSizingMode - define volume on slave trades
g_MS_VolumeRatio_settingdouble1.0MS_VolumeRatio - master volume ratio
g_FX_FixedVolume_settingdouble0.01FX_FixedVolume - fixed volume
Show all 19 inputs
NameTypeDefaultDescription
g_MinVolume_settingdouble0.01MinVolume
g_MaxVolume_settingdouble1.0MaxVolume
g_price_offset_settingdouble0.8price_offset (pips)
g_number_of_trials_settingint10number of trials for open or close orders
g_drop_tables_settingboolfalsedrop tables (set to True to drop database tables)
g_create_tables_settingboolfalsecreate tables (set to True only first time to create database tables)
g_register_slave_settingbooltrueregister slave to DB (set to True only first time you use a new master)

How to Install It

  1. 1Download the sourceUse "Download source (.zip)" above, or clone femtotrader/mysql-trade-replicator 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, and any .mqh files into the Include folder the code expects.
  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

Trade Copy MT4

by vobornik
256 stars

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

MT4 Copier & bridge Martingale High risk
Updated 3 years ago GPL-2.0 GitHub repository of Trade Copy MT4

Darwinex DWX Connect

by darwinex
232 stars

DWX Connect is an open-source bridge that links external trading strategies written in Python, C#, or Java to MetaTrader 4 and 5. It functions as a server EA that facilitates communication via file-based messaging, allowing users to execute trades and subscribe to market data without coding in MQL. The EA manages trade

MT4MT5 Copier & bridge
Updated 1 year ago BSD-3-Clause GitHub repository of Darwinex DWX Connect

Telegram API Signal Bot

by sholafalana
220 stars

Telegram API Signal Bot is a notification utility for MetaTrader 4 designed to broadcast trading activity to external communication channels. The EA monitors the terminal for order events, including executions and partial closes, and transmits the details to a Telegram group or channel using the Telegram Bot API. It of

MT4 Copier & bridge
Updated 3 years ago None stated GitHub repository of Telegram API Signal Bot

MetaTrader 4 Bridge

by BonneVoyager
84 stars

This expert advisor provides a communication layer between MetaTrader 4 and external software applications via the ZeroMQ protocol. It operates as a server that listens for remote commands to open, modify, or delete market and pending orders. The system features a request-response mechanism and a dedicated push server

MT4 Copier & bridge
Updated 6 years ago None stated GitHub repository of MetaTrader 4 Bridge

Hitback ZMQ Bridge

by EricSchles
59 stars

This expert advisor functions as a data bridge for streaming real-time market information from MetaTrader 4 and 5 to external applications. It utilizes the ZeroMQ library to transmit price ticks and order book updates to a remote server. The tool is intended for developers building quantitative trading platforms or dat

MT4MT5 Copier & bridge
Updated 6 years ago Apache-2.0 GitHub repository of Hitback ZMQ Bridge

Neo Trader

by diliproshitha
51 stars

Neo Trader is an order execution bridge that facilitates the transfer of trade data from TradingView to MetaTrader 4 and 5 terminals. Operating through a local socket server and a browser extension, it allows users to execute trades directly from TradingView position drawing tools. The expert advisor handles market and

MT4MT5 Copier & bridge
Updated 1 year ago Apache-2.0 GitHub repository of Neo Trader

More copiers and bridges

Need a Broker for MT4?

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

Compare brokers