> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quanorix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export MT4/MT5 bots

> Strategy vs portfolio, coverage, EA inputs, MT5 multi-symbol and MT4 per-symbol packs.

# Export MT4 / MT5 bots

From a **strategy detail** or **portfolio** page you can export a MetaTrader Expert Advisor (EA).

## Individual strategy

1. Open the strategy in the Databank.
2. **Export bot** → choose `MT4` or `MT5`.
3. Review the block **coverage** report.
4. Download the `.mq4` / `.mq5`.

The EA exposes execution parameters as `input`s (sizing, ATR SL/TP/trail, magic, session, GMT offset, etc.) so you can calibrate in the terminal without rewriting logic.

## Portfolio

| Platform | Packaging                                                                                                                    |
| -------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **MT5**  | One **multi-symbol EA** (one `magic` per strategy; open-position / per-symbol limits)                                        |
| **MT4**  | **One EA per symbol** in a `.zip` (one MT4 chart = one symbol; multiple strategies on the **same** symbol can share that EA) |

**Broker aliases** (Settings → Instruments) map canonical symbols to broker names on portfolio export.

## Block coverage

* **Supported** blocks: exportable with expected parity.
* Blocking unsupported blocks: UI/API prevents generating an incomplete EA by default.
* Some blocks may export with an **approximate** warning — read the reason before live trading.

After major parity/TZ changes, **re-export** older EAs.

## Inputs you should know

| Input / concept                  | Purpose                                                                     |
| -------------------------------- | --------------------------------------------------------------------------- |
| Risk / notional sizing           | How the EA sizes lots                                                       |
| `InpCompound` / `InpBaseBalance` | Compound on live balance vs fixed base (e.g. prop firm)                     |
| `InpBrokerGmtOffset`             | Chart → GMT (see [Sessions and timezones](/en/settings/sessions-timezones)) |
| `InpEntryTrigger`                | `level` (mask) vs `edge` (pulse) when applicable                            |
| Magic                            | Identifies the strategy in the terminal                                     |
| HTF / `PERIOD_*`                 | Multi-timeframe strategies                                                  |

## Realistic expectations

* MT4 pending lists can show more states than the app (the app lists executed fills).
* Excel reports use raw UTC; HTML uses `display_tz`.
* Parity depends on aligned history, GMT offset, and costs (spread/commission).

## Pre-live checklist

1. Same history/TZ mental model as the backtest (or calibrated offset).
2. Coverage without surprises.
3. Correct broker aliases (portfolio).
4. Test in Strategy Tester with the same `InpBrokerGmtOffset` you will use live (or document the difference).
