MT5 expert advisor risk settings explained: position sizing, maximum spread and EA safeguards
What common MT5 EA risk inputs usually do, from position sizing to maximum spread and loss limits, and why you must confirm each name, unit and behavior in that EA's documentation.

What MT5 expert advisor risk settings actually control
MT5 expert advisor risk settings are the inputs that limit how much an EA can trade and lose: position sizing, stop distances, spread filters, loss limits and trade caps. Their names, units and exact behavior are chosen by each developer, so an input called "Risk" or "MaxSpread" in one EA can work differently in another. Treat this article as a glossary of common patterns, then confirm every input against the documentation of the specific EA you run.
This is not a guide to opening the Inputs tab. If you need that, see how to change MT5 expert advisor inputs and save a preset. Here the focus is on what the risk inputs mean and what questions to ask about each one.
Automate this on MetaTrader 5
A MetaTrader 5 expert advisor with documented inputs, full backtest settings and clear risk limits.
Position sizing input: fixed lots versus risk percent
Most EAs offer one of two sizing models, sometimes both behind a switch.
Fixed lot size
An input such as Lots or FixedLot sends the same volume on every trade. It is predictable, but the money at risk changes with the stop distance and the symbol. A 0.10 lot on EURUSD and 0.10 lot on a gold or index CFD do not represent the same exposure.
Risk percent
An input such as RiskPercent or Risk tells the EA to size each trade so that a stop loss hit costs roughly a given share of the account. The calculation needs three things: the account value, the stop distance and the value of one price unit per lot.
A simple EURUSD illustration, assuming a standard lot of 100,000 units and roughly $10 per pip per lot:
- Account balance: $10,000.
- Risk input: 1%, so $100 at risk.
- Stop loss: 20 pips, worth about $200 per standard lot.
- Calculated volume: $100 / $200 = 0.50 lots.
That math only works if the EA reads the correct contract size and tick value from the broker. Before relying on it, check:
- Whether "risk" is a percent of balance, equity or free margin. Equity-based sizing shrinks during open drawdown, balance-based sizing does not.
- What happens when the strategy has no fixed stop. Some EAs fall back to a default lot, others refuse to trade.
- How the result is rounded to the broker's volume step and minimum lot. On a small account, the minimum lot can force more risk than the input says.
- Whether the EA respects a maximum lot cap.
You can see a symbol's contract size, volume step and minimum volume by right-clicking it in Market Watch and opening its specification. If your broker offers ES, NQ or CL as CFDs or futures in MT5, contract specifications vary by broker, so never assume one point has the same dollar value as the exchange contract. For the exchange-listed figures, compare with the contract specs published by CME Group.
Maximum spread input: units are the main trap
A MaxSpread input blocks new entries when the current spread is wider than the threshold. It protects against thin liquidity at session opens, rollovers and news releases.
The common mistake is units. MT5 measures price in points, and on a 5-digit EURUSD quote one pip equals 10 points. A value of 20 can therefore mean 2 pips or 20 pips depending on how the developer wrote the check. Set it wrong in one direction and the EA never trades; set it wrong in the other and the filter does nothing.
Questions to confirm in the documentation:
- Is the value in points, pips or price units?
- Does the filter apply only to entries, or also to exits and pending order placement?
- Is the spread checked once at signal time or on every tick until entry?
- Does a value of 0 disable the filter or block all trades?
To calibrate, watch the spread column in Market Watch on your own broker at different times of day. A CL CFD around the inventory report and EURUSD at the daily rollover can show spreads very different from the quiet-session average.
Stop loss, take profit and trailing inputs
These inputs define the exit side of risk. Check whether stops are sent to the broker as real orders or managed virtually inside the EA. A virtual stop exists only while the terminal runs and stays connected, which matters if you trade from a home PC instead of a VPS.
Also check the units again (points, pips, ATR multiples or currency), the minimum stop distance your broker allows, and whether a trailing stop starts immediately or only after a set profit.
EA safeguards: loss limits, trade caps and time filters
EA safeguards are inputs that stop trading when conditions turn unfavorable. Common ones include:
- Daily loss limit: halts new trades after a given loss. Confirm whether it counts closed trades only or includes floating losses, and when the day resets. Resets usually follow broker server time, not your local time.
- Equity stop or max drawdown: closes positions or disables the EA if equity falls below a threshold. Check whether it closes everything or just pauses entries, and whether it re-arms automatically.
- Max open positions and max trades per day: cap stacking and overtrading. Grid and averaging EAs deserve extra attention here.
- Trading hours and news filters: restrict entries to set windows. Verify the time zone the input expects.
- Magic number: identifies the EA's own trades so it does not manage positions opened by another EA or by hand. Two instances with the same magic number on the same symbol can interfere with each other.
None of these replace the platform-level switch. The Algo Trading button and the expert's "Allow Algo Trading" option control whether an EA can trade at all, as described in the MetaTrader 5 algorithmic trading help.
Why names and behavior differ between EAs
MQL5 lets developers name inputs freely, so the same concept appears under many labels:
| Concept | Names you may see | What to confirm |
|---|---|---|
| Position sizing | Lots, FixedLot, RiskPercent, MoneyManagement | Base (balance, equity, free margin), rounding, max lot |
| Spread filter | MaxSpread, SpreadLimit, MaxSpreadPoints | Points or pips, entries only or all orders, meaning of 0 |
| Daily loss | DailyLossLimit, MaxDailyDD, DayStop | Closed or floating P/L, reset time zone |
| Equity protection | EquityStop, MaxDrawdown, KillSwitch | Close all or pause, automatic re-arming |
| Trade caps | MaxTrades, MaxPositions, MaxOrders | Per symbol or per account, per magic number |
The same label can hide opposite behavior. One EA's MaxDrawdown may be a percent of starting balance, another's a currency amount from the equity peak. Only the developer's documentation, or the source code if you have it, settles the question.
How to verify each risk input before going live
- Read the documentation line by line. For every risk input, note the unit, the base value and what 0 means. If the documentation does not say, ask the developer before trading. This belongs in any due-diligence checklist before buying an MT5 expert advisor.
- Record the defaults. Defaults are often set for a particular broker or account size, not yours.
- Test one safeguard at a time in the Strategy Tester. Set a deliberately tight daily loss limit or low max spread and confirm in visual mode that the EA actually stops. The MetaTrader 5 Strategy Tester help covers tester settings, and our guide on how to test an expert advisor in MT5 explains reading the report.
- Run it on a demo account at your broker. Live spreads, minimum lots and server time behave differently from history.
- Read the Experts and Journal tabs. Well-written EAs log when a filter blocks a trade or a safeguard triggers. Silence when you expected a block is a red flag.
An EA with clearly documented inputs and set files makes these checks much faster, because you are verifying stated behavior instead of reverse-engineering it. That is the standard we aim for with our MT5 expert advisor with documented inputs and set files.
Conclusion
Risk inputs are the most important settings on any EA, and also the least standardized. Learn the common patterns, position sizing, maximum spread, stops and EA safeguards, then treat every name as a claim to verify: which unit, which base, which reset time, and what happens at zero. Test each safeguard on its own before trusting it with real capital, and remember that automated trading can still lose money even when every input is set correctly. If you want an EA where those answers are written down, look at the MT5 expert advisor from SierraOnShop.
FAQ
Should I size by balance or by equity?
It depends on the EA's logic and your preference. Equity-based sizing reduces volume while trades are in drawdown, while balance-based sizing keeps it steady until losses are realized. Check which one the EA uses rather than assuming.
Can a risk percent input still lose more than the set percent?
Yes. Slippage, gaps over the weekend, minimum lot rounding and virtual stops that fail during a disconnection can all push a loss past the intended amount.
Do EA safeguards work if MT5 is closed?
Usually not. Most safeguards run inside the EA, so they only act while the terminal is open and connected. Stops sent to the broker as real orders are the exception.
Is it safe to copy someone else's risk settings?
Only as a starting point. Account size, broker contract specifications, spreads and server time differ, so the same numbers can produce very different exposure on your account.
Where are the CFTC's warnings about trading robots?
The CFTC publishes investor education and fraud advisories, including warnings about automated trading claims, on its Learn and Protect section.
Run it in MetaTrader 5
Written by
Clement
Futures trader for more than seven years, specialized in order book and order flow scalping on US index futures, now building automated strategies. Founder of SierraOnShop.
More about the authorReady to run an expert advisor?
A MetaTrader 5 expert advisor with documented inputs, full backtest settings and clear risk limits.