Request Founder AccessApplications are open for a limited group of Founder Members

Connecting darwintIQ to MetaTrader

MetaTrader Integration with darwintIQ API

Allow WebRequest

In both MT4 and MT5, you must allow the darwintIQ API URL:

  1. Open Tools → Options → Expert Advisors
  2. Enable “Allow WebRequest for listed URL:”
  3. Add: https://darwintiq.com
  4. Click OK, then reattach the EA.

EA Workflow (High-level)

  1. Poll /api/traders every N seconds with your desired symbol, sort, and signals.
  2. Parse the top-ranked trader (or the one with the most recent signal).
  3. Map lastSignal.signalType (BUY/SELL), apply risk rules (SL/TP from your manager) and place orders.
  4. Optionally use potentialPips and fitness to confirm or throttle trading.
  5. For production, use a JSON parser library in MQL for robustness.
    Examples here use naive string parsing for simplicity.

Example Expert Advisors

We provide minimal Expert Advisor (EA) examples for MT4 and MT5. Download darwintiq-metatrader-ea-kit.zip (includes MT4/MT5 EAs, bundled JSON header for MT4, and a README)

Both EAs:

  • Expose inputs for SymbolParam, SortParam, SignalsParam, and PollSeconds.
  • Call WebRequest to fetch /api/traders.
  • Log the first trader’s fitness, lastSignal.signalType, lastSignal.signalTime, and potentialPips.
  • Include placeholders where you can implement order placement (OrderSend in MT4 / trade functions in MT5).

Notes & Best Practices

  • Replace naive string parsing with a lightweight JSON parser for MQL.
  • Add risk management: lot sizing, stop-loss, take-profit, max spread/slippage, and trading windows.
  • Implement duplicate-signal suppression to avoid opening multiple identical positions.
  • Test in Strategy Tester before using live.

Example Request

GET https://darwintiq.com/api/traders?symbol=EURUSD&sort=fitness