MetaTrader 4 integration for Stax

Markets Auto-syncFile import
ForexCFDs ✓ ✓

How to connect MetaTrader 4 to Stax

MetaTrader doesn't hand data out from a server, so the connection runs from inside your terminal: Stax gives you a small file, you drop it in, and from then on every deal you close is sent across as it closes. Set it up once and leave the terminal running — only deals closed after the setup are sent, so older history comes in from a file.

In Stax
  1. In the left sidebar, open Connections.

  2. Click Add Connection.

  3. In Select Connection, search for MetaTrader 4 and click it. Three cards open: Auto-Sync, Import CSV File and Add Manually.

  4. Choose the Auto-Sync card. Stax walks you through the setup and keeps the values you'll need to paste on screen.

  5. Download QuerStaxBridge.mq4 from the first step of that panel.

In MetaTrader 4
  1. Open File → Open Data Folder, drop the file into MQL4/Experts, then compile it with F7.

  2. Open Tools → Options → Expert Advisors, tick Allow WebRequest for listed URL and add the address Stax shows you.

  3. Turn on AutoTrading, then drag QuerStaxBridge from the Navigator onto any open chart. A smiling face in the corner means it's running; a frowning one means AutoTrading is still off.

  4. On the Inputs tab, paste the values Stax gave you and click OK.

How to import MetaTrader 4 trades into Stax from a file

The route for everything you traded before the connection existed — and the one to use if you would rather not touch the terminal's settings at all. MetaTrader saves its report as HTML.

In MetaTrader 4
  1. Click the Account History tab in the bottom Terminal panel.

  2. Right-click anywhere in the history and choose Save as Detailed Report.

  3. Choose any time range and save the .htm file.

In Stax
  1. In the left sidebar, open Connections.

  2. Click Add Connection, then pick MetaTrader 4.

  3. Of the three cards, choose Import HTML File.

  4. Click Choose File and select the saved report. Stax reads the Closed Transactions section automatically and skips cancelled orders and deposits.

  5. Confirm the timezone in the panel. MetaTrader writes broker-server wall-clock with no zone marker, so this is what puts your trades at the right hour.

  6. Check the matched trades in the preview, then confirm the import.