Your risk calculation can produce a smaller lot size and still produce an invalid order. In my native MT4 tester case, 0.05 lot returned error 131 while the symbol's minimum and step were both 0.10. The corrected 0.10 request opened a simulated order. I check the symbol's permitted volume before looking for a fault in the entry signal.
The size was small, but the request was invalid
It is tempting to read an order error as a strategy problem. The signal fired, the lot calculation ran, and the EA reached OrderSend. Yet there was no position. Lowering the lot size seems like a cautious first correction.
That correction can move in exactly the wrong direction. A symbol has a minimum volume as well as a volume step. A number below that minimum is invalid even when it is smaller than the size you originally intended to trade. Decimal formatting alone does not change that restriction.
The case used EURUSD in MT4's Strategy Tester. Its default testing environment reported a minimum lot and step of 0.10. I submitted half the minimum first, then submitted the minimum itself. The first call returned ticket -1 and error 131. The second returned ticket 1 and error 0. The selected order's recorded volume matched the requested 0.10 lot.
The actual test calls
These are the calls from the tester-only EA. The surrounding EA rejects startup outside the Strategy Tester. Both calls below are simulated requests, and the successful order is closed during cleanup.
double lots=MarketInfo(Symbol(),MODE_MINLOT);
double step=MarketInfo(Symbol(),MODE_LOTSTEP);
ResetLastError();
int bad=OrderSend(Symbol(),OP_BUY,lots/2.0,Ask,10,0,0,
"FIX07 below minimum volume",607,0,clrNONE);
int badError=GetLastError();
ResetLastError();
int good=OrderSend(Symbol(),OP_BUY,lots,Ask,10,0,0,
"FIX07 corrected min volume",607,0,clrNONE);
int goodError=GetLastError();
The useful comparison is the two requests beside the symbol properties and the saved errors. A green signal marker does not explain an invalid volume. A zero error from a later unrelated function does not explain it either. Save the error immediately after the failed call, before another operation changes it.
Check your own EA in five minutes
Find the volume that reaches OrderSend, rather than the intermediate risk number printed earlier in the calculation. Put that final value beside MODE_MINLOT, MODE_MAXLOT and MODE_LOTSTEP for the exact symbol used by the request. Check both the minimum and the permitted increments.
Then inspect how your code handles a calculated volume below the minimum. Automatically increasing it to the minimum may increase the money at risk beyond the budget that produced the original number. I would skip the entry and print the reason when the smallest valid size exceeds that budget. A technically accepted order is only useful when its size also respects the intended risk.
Keep the before-and-after request details in the same short log. If the volume already satisfies the symbol's minimum, maximum and step, the next useful evidence is the exact rejected request and the saved terminal error. Repeatedly reducing the number without that comparison leaves you guessing.
What the result establishes
This case demonstrates error 131 and its corrected simulated request in that native tester environment. It used default symbol settings without a trade-server connection; it sent no live or demo account orders. Your broker's symbol properties can differ.
If your trading bot still rejects a request, my free bug check starts with one small reproducible problem and its log.

Top comments (0)