MT4 error 134: Not enough money (ERR_NOT_ENOUGH_MONEY)

The account's free margin can't cover the order. Nothing was executed; reduce the lots or free up margin first.

134ERR_NOT_ENOUGH_MONEY
After a fixSafe to retry?
NoCould it have executed?

What it means

You see this code in GetLastError() in MQL4, after a trade function fails on the server side.

Opening the order would need more margin than the account has free.

Margin depends on leverage, lot size and the symbol, so the same order can pass one day and fail the next.

Common causes

  • A lot size too large for the account.
  • Floating losses on open trades.
  • Lower leverage set by the broker.

How to fix it

  • Check with AccountFreeMarginCheck() before sending. A result at or below zero, or error 134, means it won't fit.
  • Size orders from free margin, with a buffer.

Example in MQL4:

double lots = 1.0;
double left = AccountFreeMarginCheck(Symbol(), OP_BUY, lots);
if(left <= 0 || GetLastError() == ERR_NOT_ENOUGH_MONEY)
   Print("Not enough margin for ", lots, " lots; free margin is ", AccountFreeMargin());

Is it safe to retry?

After reducing the size or freeing margin.

Could the order have executed?

No. The order was refused for lack of free margin.

How Tickwire handles it

Tickwire treats it like MT5 10019, and the MT4 code stays in the message. See trade results.

All MetaTrader error codes

One API for MT4 and MT5

Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.