Connect MT5 Gateway
Execute MetaTrader 5 client orders in XCore through the PrimeXM MT5 Gateway.
Before you start: Connect MT5 Feeder and Execute Trades.
Steps
1 · MT5 connector
Use the connector DEMO_MT5 from Connect MT5 Feeder.
Reference: Connector
2 · MT5 trading connection
In ConnectorConfigSetting, set your own password as LoginPassword of DEMO_MT5 · trading.
Reference: Connector Config
3 · MT5 trading account
Create the account DEMO_MT5_TRADE and enable it.
Reference: Connector Account
4 · MT5 symbol execution settings
On the account DEMO_MT5_TRADE, add each symbol:
lq_pool=DEMO_POOL,markup_profile=DEMO_MARKUP: they come prefilled, as the only pool and markup profile.- BITCOIN only:
session=SUN|00:00:00-SAT|24:00:00(it trades around the clock) enable= 1
Reference: Connector Account
5 · Install the MT5 Gateway
On the MT5 server, copy PXMGateway64.exe into a new folder under the History Server Gateway folder, with the History Server stopped.
video=896546700
6 · Configure the MT5 Gateway
In MT5 Administrator, right-click Gateways → Add.
Set the module to PXMGateway64 (PrimeXM Gateway) with Trade only, then copy these values:
| Copy from (XCore Portal) | Paste into (MT5 Administrator · Gateway) |
|---|---|
Top-menu dropdown (where the versions are) → XCore DNS, and ConnectorConfigSetting · value of DEMO_MT5 · trading · SocketAcceptPort |
Common · Trading server: <XCore DNS>:<trading port> |
ConnectorConfigSetting · value of DEMO_MT5 · trading · LoginUsername |
Common · Trading login |
| The password you set in step 2 | Common · Password |
| – (your MT5 client groups) | Groups · Add: the groups whose orders go to XCore, e.g. real\* |
ConnectorStreamSetting · instrument of each symbol (Connect MT5 Feeder, step 4) |
Symbols · Add: the MT5 symbols with exactly these names, or their path, e.g. Forex\* |
ConnectorAccount · name: DEMO_MT5_TRADE (step 3) |
Parameters · Add: Parameter 1000: Bridge, Value sec=Forex\*;g=real\*;acc=DEMO_MT5_TRADE |
- A Parameters row sends orders for the MT5 symbol paths in
sec, from the groups ing, to the XCore account inacc. - After each change to the Parameters, check the MT5 connector trading log for
PARSE CONFIG START: a syntax error keeps the old configuration.
Note the Gateway ID on the Common tab (MT5 sets it): step 7 needs it.
See: MT5 Gateway configuration · Routing Rules · Execution Rules · Configuration examples
7 · Route orders to the Gateway
In MT5 Administrator, right-click Routing → Add:
| Copy from | Paste into (MT5 Administrator · Routing) |
|---|---|
| – | Common · Name, e.g. PXMGateway; Perform action: Process to dealers; Where request is: All; Where order is: All |
Gateway · Groups and Symbols (step 6), e.g. real\*, Forex\* |
Common · Where conditions are · Add: Type Group or Symbols, Condition Equal (=), Value: the mask |
| Gateway · Common · ID (step 6) | Dealers · Add: Login |
See: MT5 routing configuration · Checking the Gateway rules
Apply
Click Verify, then Apply & Restart. More →
Next → Route A/B Book