# The trade did not execute

> The command reached your EA but no position opened, or it shows Failed. Read the reason and find the fix for the most common causes.

Source: https://zb-connector.com/docs/troubleshooting/trade-not-executed/

This is checkpoint 6 of [find where an alert stopped](https://zb-connector.com/docs/troubleshooting/find-where-it-stopped/). The command was collected by the EA. Either the EA refused it or your broker did.

## Symptom

**Command History** shows the command as **Delivered** or **Failed**, and there is no new position in MT5 (or not the position you expected). **Delivered** only says the EA collected the command: it does not prove a trade was opened.

## Causes, most likely first

1.  **Your broker refused the order.** The row shows **Failed**. Hover the badge for the reason, such as “Invalid stops in the request”, and look the number up in [MT5 errors](https://zb-connector.com/docs/troubleshooting/errors/).
2.  **The EA refused it.** The MT5 **Experts** log has the reason (table below).
3.  **The symbol name does not match your broker’s.**
4.  **Algo Trading is off** in MT5: [error 10027](https://zb-connector.com/docs/troubleshooting/errors/10027/).
5.  **The size or the stops are not valid** for the symbol: [10014](https://zb-connector.com/docs/troubleshooting/errors/10014/), [10016](https://zb-connector.com/docs/troubleshooting/errors/10016/).
6.  **The market is closed or the account lacks margin:** [10018](https://zb-connector.com/docs/troubleshooting/errors/10018/), [10019](https://zb-connector.com/docs/troubleshooting/errors/10019/).

## What the EA writes in the Experts log

| Log line | Cause | Fix |
| --- | --- | --- |
| `Trade placed successfully. Ticket=…` | It worked. | Look in MT5’s position list and under **Accounts** in the dashboard. |
| `Failed to select symbol: <symbol>` | The symbol does not exist at your broker under that name. | Use the exact MT5 symbol name, or set the EA’s **Symbol prefix** / **Symbol suffix** inputs. |
| `Trade blocked — EA disabled via setEAStatus` | The EA’s remote switch is off. | Switch it back on from the dashboard, or send `setEAStatus` with `enabled` true. |
| `Trade blocked — trading disabled: <reason>` | A profit or loss safeguard limit has tripped. | Check the safeguard state in the dashboard and reset it when appropriate. |
| `Max total open positions reached: <n>` | The account already holds the maximum number of positions set in the EA inputs. | Close positions, or raise the account-wide limit in the EA inputs. |
| `Max open positions for symbol <symbol> reached: <n>` | The symbol already holds the maximum set in the EA inputs. | Close positions on that symbol, or raise the per-symbol limit. |

By default the limits are 10 positions in total and 3 per symbol, counting only positions opened by this EA.

## Fix

1.  Read the status and, for **Failed**, the reason on hover.
2.  Open the Experts log (Toolbox → Experts) around the time of the command and match the line against the table.
3.  Correct the cause, then send the command again on a demo account. A failed command is not retried.

## Confirm it is fixed

The Experts log shows `Trade placed successfully` and the position is open in MT5.

## Still stuck?

With these items we can find the failing step quickly. Collect them before you write.

-   The number of the **first checkpoint that failed** and the time of the alert, with your time zone.
-   The row from TradingView's alert log, including the **Webhook status** column.
-   The row from **Command History** (License Details page): status, time, and the reason shown when you hover **Failed**.
-   The last lines of the MT5 **Experts** log around that time.
-   Your alert message as TradingView sends it.

**Always remove:** your license key (write `YOUR_LICENSE_KEY`), passwords, and any screenshot where the EA panel shows the key.

[Write to support with this checklist filled in](mailto:contact@zb-connector.com?subject=Help%3A%20The%20trade%20did%20not%20execute&body=Page%20I%20followed%3A%20https%3A%2F%2Fzb-connector.com%2Fdocs%2Ftroubleshooting%2Ftrade-not-executed%2F%0A%0AFirst%20checkpoint%20that%20failed%20\(1-6\)%3A%0A%0ATime%20of%20the%20alert%20\(with%20time%20zone\)%3A%0A%0ATradingView%20alert%20log%2C%20Webhook%20status%3A%0A%0AZB%20Connector%20Command%20History%20status%20\(and%20the%20reason%20shown%20when%20you%20hover%20Failed\)%3A%0A%0ALast%20lines%20of%20the%20MT5%20Experts%20log%3A%0A%0AAlert%20message%20\(replace%20the%20license%20key%20with%20YOUR_LICENSE_KEY\)%3A%0A%0A%0A%0ADo%20not%20send%20your%20license%20key%2C%20passwords%20or%20full%20screenshots%20of%20the%20EA%20panel%20\(it%20shows%20the%20key\).)(contact@zb-connector.com).

## Related

-   [MT5 errors](https://zb-connector.com/docs/troubleshooting/errors/)
-   [Commands overview](https://zb-connector.com/docs/commands/overview/)
