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.
Online Tools
Popular Symbols Trading Hours
Open/close times, weekend hours & live market status:
Related Articles
What Is Leverage in Forex? A Complete Guide for Traders
Discover what leverage in forex means and how it amplifies both gains and losses. Learn risk management tips and how Camovia Tray helps you monitor MT5/MT4 leveraged positions from your system tray.
What Is MT4 and MT5 in 2026? A Trader’s Guide to the Platforms That Still Run the Markets
Discover what MT4 and MT5 are in 2026, their key differences, and how Camovia Tray turns your trading terminal into a discreet tray tool for quick quotes and position management.
MT5 vs TradingView for Funded Trading: Why the Best Prop Traders Use Both
MT5 vs TradingView for funded trading—why top prop traders use both for analysis and execution, and how Camovia Tray helps you monitor positions from the system tray without switching windows.
CME WTI Trading Hours: A Complete Guide to NYMEX Crude Oil Futures Sessions
Track CME WTI trading hours and manage your crude oil positions from the system tray with Camovia Tray—live quotes stay on your PC.
Gold Profit per Lot: What One XAUUSD Lot Really Earns
On gold 1 lot is 100 oz, so every $1 move in XAUUSD is $100. See profit per lot for $1, $5 and $10 moves, and Camovia Tray keeps lot size visible.
More Articles
Best MT5 Close Position Shortcut Tools
Discover the best MT5 close position shortcut tools for fast trade exits. Camovia Tray lets you manage and close positions from the system tray—keeping MT5 hidden and your data local.
Should I Buy Call or Put Options on SPY? A Trader‘s Guide to Directional Decisions
Deciding between SPY calls and puts? Learn the key factors for each strategy and how Camovia Tray helps you monitor options positions from your system tray.
Why Every Trader Needs Quick Tools for MT5: Download FX Blue Chart Tools and More
Discover Camovia Tray, the essential quick tool for MT5 traders. Download FX Blue chart tools and manage positions from your system tray without opening the terminal.
Which Stocks Will Go Up Tomorrow Morning? Stop Asking, Start Preparing
Get real-time quotes and manage MT5/MT4 positions from your system tray with Camovia Tray—so you can prepare for the market open instead of guessing which stocks will go up tomorrow.
FundedNext XAUUSD Trading Hours: A Complete Guide for Gold Traders
Discover FundedNext XAUUSD trading hours, weekend closures, and Exness gold schedules. See how Camovia Tray helps you monitor positions from the system tray.