MT4 Error 131: What Causes "Invalid Trade Volume" and How to Fix It
Camovia Tray Team · 2026-09-15
You've just spent hours fine-tuning your Expert Advisor. You're confident in your strategy, the backtest looked promising, and you're ready to go live. You hit the "AutoTrading" button, watch the Journal tab—and then you see it: OrderSend error 131. The trade didn't go through.
It's a frustrating moment, especially when you're in the middle of analyzing charts and managing your open positions. You double-check your lot size. 0.1, standard. That should work, right?
Not necessarily. Error 131, defined in the MQL4 reference as ERR_INVALID_TRADE_VOLUME, is one of the most common stumbling blocks for traders, but it's usually straightforward to fix. It simply means the lot size you're trying to trade doesn't match what your broker allows for that specific instrument.
Why Does Error 131 Happen?
The core issue is a mismatch between your order volume and the broker's specifications. Think of it like trying to fit a square peg into a round hole. The trading server checks your requested lot size against three key rules, and if any fail, it rejects the order with error 131:
- Lot Size Below Minimum: Most brokers require a minimum of 0.01 lots for standard accounts. If your EA tries to send 0.001 (some code might accidentally use an integer instead of a double), you'll instantly get this error.
- Lot Size Above Maximum: Some brokers set a maximum lot size per trade. Requesting 100 lots on an account that caps at 50 will trigger the same error.
- Lot Step Violation: The lot size must be a multiple of the broker's "lot step." If the step is 0.01, you can trade 0.01, 0.02, or 0.03; but you can't trade 0.015.
A Common Scenario: EA vs. Broker Specifications
Imagine you've developed or purchased an Expert Advisor. It's been tested on a demo account with one broker, working perfectly. You then move it to a live account with a different broker, and suddenly, it starts failing with error 131.
This is a classic situation. The EA's code might have a fixed lot size of 0.1. However, your new broker might not allow 0.1 lots for the specific pair you're trading. For instance, some brokers have a minimum lot size of 1.0, or they might have a different lot step. Your EA, built for one environment, is now incompatible with another.
How to Fix MT4 Error 131
Here's how to get your EA back on track:
- Check the Broker's Specifications: In your MT4 terminal, right-click on the symbol you're trying to trade (e.g., EURUSD) and select "Specification". A window will pop up showing the Volume Min, Volume Max, and Volume Step. These are your golden rules.
- Normalize Your Lot Size in Your EA: The most robust fix is to have your EA automatically adjust the lot size to match these specifications before it sends an order. This is called "normalizing" the volume.
A simple MQL4 function for this would look like:
double NormalizeLotSize(double requestedLots, string symbol = "") {
if (symbol == "") symbol = Symbol();
double lotStep = MarketInfo(symbol, MODE_LOTSTEP);
double minLot = MarketInfo(symbol, MODE_MINLOT);
double maxLot = MarketInfo(symbol, MODE_MAXLOT);
requestedLots = MathRound(requestedLots / lotStep) * lotStep;
requestedLots = MathMax(minLot, MathMin(maxLot, requestedLots));
return requestedLots;
} Calling this function before OrderSend() ensures your EA always submits a valid trade volume.
Beyond the Code: Managing Your Trades Smoothly
While fixing error 131 is a technical fix, dealing with such interruptions highlights a broader need for a smoother trading workflow. You want to monitor your trades and market conditions without constantly wrestling with the MT4 terminal interface.
This is where a tool like Camovia Tray comes in. It turns your MT4 (and MT5) into a lightweight tray tool, placing essential features right at your fingertips in the system tray. Instead of keeping the full terminal open and navigating through menus, you can quickly check live quotes by hovering over the tray icon. You can also view all your open positions—including details like direction, lot size, open price, and current profit—in a convenient floating panel.
This is particularly useful when you've just resolved an error like 131 and placed a trade. With Camovia Tray, you can keep an eye on your new positions and even close them with a single click, all without reopening the main MT4 window. It provides a faster, less intrusive way to manage your trades and stay on top of the market.
Error 131 is a simple fix: check your broker's rules and adjust your lot size. But when it comes to streamlining the entire trading process, a tool that offers quick, glanceable information can make a significant difference in your daily routine.
MT4/MT5 Tray Assistant
Silent tracking, one-click close - check quotes and manage positions right from the tray.
Download Camovia TrayFrequently Asked Questions
Can the tray icon be disguised?
Yes. The tray icon can disguise itself as a cloud drive or a common system tool, so market watching stays low-key.
What is the tray lock feature?
Lock the tray function instantly at key moments to protect your privacy and prevent private information from leaking.
What information can I monitor?
Quotes and open positions: symbol, direction, open time, current P&L, and more - all visible in the popup positions tab. Click an order to close it.
Which languages are supported?
Chinese and English, switchable on both the website and the client.
Popular Symbols Trading Hours
Open/close times, weekend hours & live market status:
Related Articles
Understanding the Bid-Ask Spread: A Cost to Your Trading
Understand the bid-ask spread and how it quietly eats into your profits. Camovia Tray lets you monitor live quotes and manage positions from your system tray—so you stay informed without the clutter.
The Equity Line That Matters More Than Your P&L
Turn your MT5/MT4 into a tray tool and watch your equity line without opening the terminal. Camovia Tray keeps quotes and positions local for private, clutter-free review.
Camovia Tray Now Supports MT4: Turn Your MT4 into a Tray Tool
Camovia Tray now supports MetaTrader 4 - turn your MT4 into a tray tool: hover for quotes, monitor positions, hide the window in one click, and keep all data on your computer.
Why Is MT4 Still a Staple, and What Does It Actually Do in 2026?
Discover why MT4 remains a top trading platform in 2026 and how Camovia Tray turns it into a tray tool for quick quotes, position management, and privacy—all data stays local.
What Is MT4 and MT5? A Trader’s Guide to MetaTrader Platforms
Discover what MT4 and MT5 are, their key differences, and how Camovia Tray turns your trading terminal into a tray tool for quick quotes and position management—without keeping the full platform open all day.