MT4 · code and request checks
MT4 error 134 not enough money: check the requested lots
Your 100-lot request can fail with 10,000 in free margin. My MT4 test returned error 134; the same BUY at 0.1 lots was accepted.

Arnold Holm · 2026-10-15
What the error means
A trader reported error 134 on the first trade even though the account appeared to have enough funds. That is a useful place to start: inspect the amount the EA actually requested. A percentage-risk input does not tell you the final lot amount, and a positive balance does not mean every legal position size is affordable. I ran my own small case in MT4 build 1491, using EURUSD H4 in the native Strategy Tester. The tester started with balance and free margin of 10,000 and an account ratio of 1:100. Its symbol allowed volumes from 0.1 to 100 lots in steps of 0.1. The 100-lot BUY was legal as a volume, but needed 120,440 in margin. The tester rejected it with ticket -1 and error 134. I then sent the same side at the minimum 0.1 lots. That simulated BUY received ticket 1 and error 0. I read the recorded order volume back and closed it in the tester. I check the actual requested lots and free margin before changing the signal or adding money.
Three code paths to check
1. The risk input hides the final volume
A setting such as two percent is only an input. The code still has to turn a stop distance and cash risk into lots in the correct units. A misplaced conversion can produce a much larger request than the label suggests. Log the final lots immediately before the send, beside the symbol minimum, maximum and step. In my case, 100 lots passed those symbol limits and still failed the money check. A valid volume and an affordable volume are separate checks.
2. Balance is being used in place of free margin
Use the account state at the request time. Existing positions and open losses can change what remains available. The MT4 AccountFreeMarginCheck function evaluates the remaining margin for a specified symbol, side and volume at current prices. Its documented insufficient-margin result raises error 134. Clear the old error before calling it and capture the result immediately. Keep that preflight result separate from the eventual OrderSend result. A successful preflight does not reserve funds or prevent a later rejection.
3. Making the order smaller is treated as a complete repair
The smaller order in my test answered one narrow question: would this account state accept that amount? It did not establish a suitable stop, a cash-risk budget or a profitable strategy. I would first correct the calculation that produced the unintended size. Then I would check the intended stop-loss risk and margin again. If the smallest legal amount is too large for the chosen risk, the trade should stay blocked. Automatically raising it to the broker minimum changes the risk you asked for.
The tester-only volume change that reproduced the error
This excerpt preserves the two requests used in the test. The complete EA rejects any launch outside the tester. It records both return values and errors, checks the accepted order's actual volume and closes that simulated position. The screenshot shows the 100-lot rejection and the accepted 0.1-lot request on the same run. Use the result to compare your own failed request, rather than paste this test sequence into an EA that trades an account. The example intentionally tries an unaffordable request to make the failure visible.
if(!IsTesting()) return;
double excessive=MarketInfo(Symbol(),MODE_MAXLOT);
double lots=MarketInfo(Symbol(),MODE_MINLOT);
ResetLastError();
int bad=OrderSend(Symbol(),OP_BUY,excessive,Ask,10,0,0,"FIX12 unaffordable valid volume",607,0,clrNONE);
int badError=GetLastError();
ResetLastError();
int good=OrderSend(Symbol(),OP_BUY,lots,Ask,10,0,0,"FIX12 affordable min volume",607,0,clrNONE);
int goodError=GetLastError();This was an offline/default MT4 tester run on one symbol and account setup. It sent zero account orders and does not establish a safe trading size.
How you know it is fixed
The large legal volume is rejected
The 100-lot request returned ticket -1 and error 134. The tester logged required margin of 120,440 against 10,000 free margin. Preserve the surrounding Journal lines so the generic error retains its cause.
The smaller amount is accepted and read back
The 0.1-lot BUY returned ticket 1 and error 0. Reading the simulated order confirmed the requested volume. A positive ticket alone was not the only check; the order was also closed in the tester.
Your five-minute Journal check
Open one rejected trade in your MT4 Journal. Compare its requested lots, free margin and required margin at that exact time. If the number differs from your calculation, trace that conversion first. Then inspect the symbol volume rules and the margin preflight before another demo attempt.
Your own source
Find the next line to check
Start with the free EA-Check. Your code stays in your browser. It highlights patterns with line numbers; it does not prove the broker accepts an order.
Want one small change shown on your own case?
SOLVED-FIRST: one small fix or change to your own case, shown first as screenshots or a short screen video. 15 USD fixed (or the higher platform minimum), first five paid orders only during 4–17 October 2026. The file follows within 24 hours after funding. Close on Upwork first; marketplace cases stay on their marketplace.
Outside that sprint: R49: one authorised, reproducible MT4/MT5 defect, with three agreed cases. 49 USD fixed. Delivery within 48 hours after source review and funding. The exact case is agreed before funded work.
Send the expected and actual behaviourRelated checks
Common questions
Does error 134 mean my entry signal is wrong?
It identifies insufficient money for that request. Start with the actual volume and account margin state; changing the signal alone does not explain the rejection.
Is this the same as MT5 error 10019?
Both concern insufficient funds, but MT4 and MT5 use different request APIs and error reporting. The linked MT5 page shows its separate calculation case.
Sources and limits
- Trader question: error 134 despite an apparently funded account
- Official MQL4 AccountFreeMarginCheck
- Own native MT4 rejection and accepted smaller order
These public questions explain the error; use your own EA log to check whether the same cause applies.