TROUBLESHOOTING · METATRADER 5

MT5 "not enough money" error

SYMPTOM

Orders are rejected with "Not enough money" or error 134, even though the balance looks fine.

Causes, most likely first

1. Free margin, not balance, is the binding constraint (retcode 10019)

Open positions lock margin, and losing positions consume free margin as they move against you. A $1,000 balance with three open trades and an unrealised loss can have very little free margin left. Check the Trade tab, which shows free margin directly, rather than looking at the balance figure.

2. The requested lot size is too large for the account

Gold has a large notional value — a standard lot is around $240,000 at a $2,400 price — so even modest lot sizes require meaningful margin. Work out the requirement before assuming the platform is wrong; the margin calculator does it for your leverage.

3. The EA sends the order instead of checking first

This one is preventable rather than fixable. MetaTrader exposes OrderCheck(), which runs a request against the server rules and reports the margin it would consume and whether it would be accepted — without placing anything. An EA that calls it, or simply reads ACCOUNT_MARGIN_FREE and compares it against the margin the position needs, never sends an order it cannot afford. Leave a buffer rather than sizing to the last dollar: an open position moving against you consumes margin continuously, so an order that fits when it is calculated may not fit when it arrives.

4. It is a demo account opened with low leverage or a small balance

The single most common phrasing of this error is not enough money on demo, and the reason is that a demo account is created with a leverage and a starting balance fixed at that moment. On many brokers neither can be changed afterwards. A demo opened at 1:100 with $1,000 will refuse a gold order that the same EA places without complaint on a 1:500 live account, and nothing in the EA settings will reconcile the two. Open a new demo with the leverage and balance you actually intend to trade, then test again.

5. Pending orders are holding margin you forgot about

MetaTrader reserves margin for pending orders as though they were already open, so a ladder of buy-stops that has not triggered is still consuming free margin. This is invisible in the balance and easy to miss in the Trade tab because pendings sit below the positions. Cancel the ones that are no longer wanted, and if an EA places them, count them inside its exposure cap rather than only counting filled positions.

6. Hedged positions cost margin differently from what the EA assumes

On a hedging account the broker decides what an opposite position costs through its hedged-margin rule. Some charge margin on the larger leg only, others on both legs in full, and the figure is stated in Market Watch → Specification under margin. An EA written on the assumption that the second leg is free will hit this error the first time it tries to hedge on a broker that charges both.

7. Leverage is lower than you think

Many brokers reduce leverage on metals relative to FX, apply lower leverage above certain position sizes, or reduce it around weekends and major events. The account-level figure in your profile is not necessarily the figure applied to gold.

8. The account is too small for the strategy's minimum position

If the minimum lot requires more margin than the account can support at the strategy's stop distance, no configuration change will fix it. The answer is a smaller stop or a larger account — see what account size do I need.

Why this happens

The error name is misleading, which is why it causes so much confusion. MetaTrader is not saying the account has no money; it is saying the margin required for this specific order exceeds what is currently free.

For an automated system this typically appears partway through a session rather than at startup. The first trades open normally, each consuming margin, and then a subsequent order is refused. Watching only the balance makes this look random.

The structural fix is a concurrent-position cap rather than more capital. Letting margin be the limiter means the system opens the largest number of positions the broker will still permit, which is precisely the wrong behaviour at precisely the wrong moment.

Common questions

Why does MT5 say not enough money when I have a balance?

Because the binding constraint is free margin rather than balance. Open positions reserve margin and only what remains is available to a new order, so an account showing $500 with most of it committed will refuse a trade that $500 would otherwise cover.

How much do I need to trade gold with a bot?

There is no single figure, because the floor is set by the broker minimum lot and your stop distance rather than by preference. The smallest permitted gold trade already carries a fixed dollar risk per point, and if that exceeds the percentage you intended to risk then the account is too small for the strategy regardless of what any marketing claims.

Related problems

Further reading

Bot built for prop firm rulesAll troubleshootingContact support

Educational information only, not financial advice. Trading leveraged products carries substantial risk of loss. Last updated 2026-09-04.