MT4 (Manager API) to LMAX
A tool to copy trades from an MT4 server, using the Manager API through a .NET wrapper, to LMAX using their .NET API.
A tool to copy trades from an MT4 server, using the Manager API through a .NET wrapper, to LMAX using their .NET API.
You will need the latest version of LmaxClientLibrary.dll and LMAX-Instruments.csv, both obtained from LMAX. You also need the mtmanapi.dll files from an MT4 Administrator installation — they are required by the .NET wrapper.
The Chocolatey package is available here: nuget.cplugin.com/feeds/apps/CPlugin.CopyTrade.ManAPITool.LMAX/versions
Settings
The first time you run the application, it generates a sample settings file for you.
- The
<source>node describes the source MT4 server connection parameters. Make sure this account has manager rights. - The
<map>nodes describe the mapping between MT4 symbol names and LMAX symbol names. You can use regular expressions. - The
<destination>nodes set the LMAX connection settings — add as many as you want. - The
<copy>node defines the copying logic. In thewhereclause you can write an expression using FLEE, where thetradevariable is available. In thetoparameter you put the id of the destination connection and the multiplier you want to use.
<?xml version="1.0" encoding="utf-8"?>
<settings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" lmax_csv="LMAX-Instruments.csv">
<!-- put your MT4 connections credentials here -->
<source address="127.0.0.1" port="443" login="1" password="password123" />
<!-- mapping between MT4 symbol name to LMAX -->
<map from="(...)(...)" to="$1/$2" />
<map from="(...)(...)c" to="$1/$2" />
<map from="XAUUSD" to="XAU/USD" />
<map from="XAUUSDx100" to="XAU/USD" />
<map from="US30" to="WS30" />
<!-- LMAX connections list, choose unique guid for each connection to keep relations with settings and persistance database, and never change after -->
<destination guid="76675c54-ba9b-4fd7-9002-56733a64934a" url="https://web-order.london-demo.lmax.com" login="login123" password="password123" isLive="false" />
<destination guid="b4ddeeb2-0efc-4d9e-95d7-be843d60a8f4" url="https://web-order.london-demo.lmax.com" login="login123" password="password123" isLive="false" />
<!-- rules to copy from MT4 to LMAX -->
<copy where="trade.Login in (817505; 203225; 205812) and trade.Symbol <> "US30"">
<!-- define which LMAX connection to use and how much volume to copy -->
<to guid="76675c54-ba9b-4fd7-9002-56733a64934a" coef="0.2" />
</copy>
<copy where="trade.Login in (817505; 203225; 205812) and trade.Symbol = "US30"">
<to guid="76675c54-ba9b-4fd7-9002-56733a64934a" coef="0.015" />
</copy>
<copy where="trade.Login in (1000; 210289)">
<to guid="76675c54-ba9b-4fd7-9002-56733a64934a" coef="1" />
</copy>
</settings>

