How to Use MQL Robots with FIX API Terminal

FIX API Terminal supports automatic and semi-automatic trading using robots written in MQL. To run a strategy, the robot source code file — such as *.mq4 — is required. This page explains how MQL robots work with FIX API Terminal, why the source code is needed, and how to control slippage when running automated FIX API trading.

Quick Answer: Yes, you can use MQL robots with FIX API. FIX API Terminal runs automatic and semi-automatic strategies based on robots written in MQL, provided the robot source code file (such as *.mq4) is available. This lets traders keep familiar MQL trading logic while executing through a direct FIX API connection.

Can You Use MQL Robots with FIX API?

Many Forex traders have built or bought trading robots — also called Expert Advisors — written in MQL, the language used by the MetaTrader platforms. A common question is whether that work can carry over to FIX API trading.

With FIX API Terminal, the answer is yes. FIX API Terminal supports automatic and semi-automatic trading using MQL-based robots, so traders do not have to abandon familiar trading logic when they move to a direct FIX API connection. Instead of running the robot on a standard retail platform, the strategy runs inside FIX API Terminal and executes through the FIX API protocol.

How FIX API Terminal Runs MQL Robots

FIX API Terminal takes the logic of an MQL robot and runs it against a FIX API connection to the broker. The robot’s trading rules — when to open, modify, or close positions — are preserved, but the orders are sent as FIX messages directly to the broker’s FIX API endpoint rather than through a standard retail platform layer.

This means a trader can keep using a strategy they already understand and trust, while gaining the direct connectivity and execution transparency of FIX API trading. Manual and semi-automatic control remain available alongside the automated robot, so the trader can step in when needed.

Why the Source Code Is Required

To run an MQL robot in FIX API Terminal, the robot source code file — such as *.mq4 — is required. A compiled-only robot, distributed without its source, cannot be used.

The reason is technical: FIX API Terminal needs the actual MQL source code so the strategy’s logic can be prepared to run against a FIX API connection. If you bought a robot, this means you need the version that includes the source code file, not only a compiled file. If you developed the robot yourself, you already have the source and can use it directly.

Managing Slippage with Limit IOC and Limit FOK

One advantage of running MQL robots through FIX API Terminal is order-type control. Many MQL robots are written to use market orders, which can be exposed to slippage. FIX API Terminal can replace the market orders used by an MQL robot with Limit IOC (Immediate or Cancel) or Limit FOK (Fill or Kill) orders, in fully automated mode and without changing the robot’s code.

Limit IOC and Limit FOK orders specify the price at which an order may be filled, which helps a trader control slippage in automated FIX API trading. This lets a robot designed for a standard platform run in a more controlled way through a FIX API connection.

A Practical Example

Suppose a trader owns an MQL robot that opens trades with market orders. The trader downloads FIX API Terminal, connects it to a broker that supports FIX API accounts, and loads the robot’s *.mq4 source code. The trader then sets FIX API Terminal to replace the robot’s market orders with Limit FOK orders. The robot’s strategy logic is unchanged, but every order now runs through the FIX API connection with slippage control. This is a typical way to bring an existing MQL robot into automated FIX API trading.

Pros and Limitations

Running MQL robots with FIX API Terminal lets traders reuse familiar strategies, gain direct FIX API connectivity, and apply professional order types for slippage control. The main limitation is that the robot source code file is required, so compiled-only robots cannot be used. As with any automated trading, this approach does not remove market risk, and results depend on the strategy, the broker, and market conditions.

Frequently Asked Questions

Can I use MQL robots with FIX API Terminal?

Yes. FIX API Terminal supports automatic and semi-automatic trading using robots written in MQL, provided the robot source code file, such as *.mq4, is available.

Why does FIX API Terminal need the robot source code?

FIX API Terminal needs the MQL source code file so the strategy’s logic can be prepared to run against a FIX API connection. A compiled-only robot without its source code cannot be used.

Can I run a robot I bought without the source code?

No. To run a purchased MQL robot in FIX API Terminal, you need the version that includes the source code file, such as *.mq4, not only a compiled file.

Do I need to change my robot’s code to run it through FIX API?

Not necessarily. FIX API Terminal can replace the market orders used by an MQL robot with Limit IOC or Limit FOK orders in fully automated mode, without changing the robot’s code.

How does running an MQL robot through FIX API help with slippage?

FIX API Terminal can convert a robot’s market orders into Limit IOC or Limit FOK orders, which specify the price at which an order may be filled and help the trader control slippage.

Do I need a special broker to run MQL robots through FIX API?

Yes. To run automated FIX API trading live, the broker must provide FIX API account connectivity.

Conclusion

MQL robots and FIX API trading work well together in FIX API Terminal: traders can reuse familiar MQL strategies, execute through a direct FIX API connection, and apply Limit IOC or Limit FOK orders to control slippage — as long as the robot source code file is available.

Download the free FIX API trading platform Learn how FIX API trading works

Related: Automated FIX API Trading · FIX API Brokers · FIX API Trading Platform