MT5 GUIDE · BK CORP CLUB
MT5 Expert Advisor Settings Explained: What Each Input Does and How to Set It Safely
Lot size, stop loss, take profit, magic number, max spread — a plain-English guide to the most common MT5 Expert Advisor inputs and how to configure them safely.
When you attach an Expert Advisor to a chart in MetaTrader 5, a settings panel appears with a list of inputs. These are the variables the EA uses to make every trading decision — lot size, stop loss, trading hours, spread limits and more. Getting them right matters as much as choosing the right EA.
This guide explains the most common inputs you will see, what each one does and how to approach the settings safely.
Lot size (or risk percentage)
The lot size controls how large each trade is. A standard lot is 100,000 units of the base currency. Many EAs use mini lots (0.10) or micro lots (0.01) for smaller accounts.
Some EAs give you a fixed lot size input: you enter a number and every trade uses that size. Others give you a risk percentage: you enter something like 1.0 and the EA calculates the lot size as 1% of your account balance each time.
A fixed lot size is simpler and more predictable. A risk percentage scales position size automatically as the account grows or shrinks, which can be useful but requires understanding how the size will change over time.
Setting it safely: Start lower than you think you need to. A lot size that feels modest in a backtest can feel very different when you watch it in real time. If you are new to an EA, begin at the minimum lot size and observe the drawdown before scaling up.
Stop loss and take profit
Stop loss (SL) is the maximum loss the EA will accept on a single trade before closing it. Take profit (TP) is the target gain at which the trade is closed automatically.
Both are usually measured in pips or points depending on how the EA was written. On MT5 with a 5-digit broker, one pip = 10 points.
Some EAs manage stop loss and take profit automatically based on market conditions and do not expose these as inputs. Others let you set them directly.
Setting it safely: Never remove a stop loss entirely. An EA running without a stop loss on a leveraged account can lose an entire balance in a single adverse move. If the EA allows it, verify that the stop loss input is active and set to a level that makes sense for the instrument's normal daily range.
Magic number
The magic number is a unique identifier that the EA assigns to its own trades. MT5 uses it to tell trades apart when multiple EAs are running on the same account.
If two EAs share the same magic number, one may try to manage the other's trades. The result is usually unexpected closures or doubled position sizes.
Setting it safely: Use a different magic number for each EA and each chart instance. If you are running the same EA on EURUSD and XAUUSD, give each a different magic number.
Maximum spread
This input tells the EA the highest spread (in points or pips) at which it is allowed to open a trade. If the spread is wider than the limit, the EA waits.
Spreads widen around news events, at the market open and during thin sessions. Without a maximum-spread limit, the EA may open trades at a poor entry cost.
Setting it safely: Find the typical spread for your symbol and broker using the Market Watch spread column. Set the maximum spread to roughly 1.5–2× the normal spread during the EA's usual trading hours. Setting it too tight can prevent the EA from trading at all; setting it too loose defeats the purpose.
Trading hours
Many EAs let you restrict the hours during which they open trades. This is usually expressed as server-time hours (the time shown in the MT5 bottom bar, which is your broker's server time, not your local time).
Gold and forex EAs often avoid the late Asian session when spreads are widest and volatility is lowest. Some EAs also close all positions before the weekend.
Setting it safely: Compare the EA's default hours with when the instrument is most liquid on your broker. The London and New York overlap (roughly 13:00–17:00 GMT) is typically the most liquid period for XAUUSD and major forex pairs.
Max trades or max open positions
This input limits how many trades the EA can hold at once. Without a limit, a strategy in a trending market could pyramid many positions, amplifying both gains and losses.
Setting it safely: Start with the EA's default or a conservative number. Understand whether the EA's drawdown figures in the backtest assume this limit was in place.
A note on inputs you do not understand
If the EA documentation does not explain an input, do not guess. Run the EA on a demo account with the default settings until you understand what the input changes by observing the trades. Changing inputs without understanding them is one of the most common ways traders accidentally break a strategy that was working.
Always test any new settings on a demo account before applying them to a live account. No setting eliminates trading risk.
Related reading: How to backtest an Expert Advisor in MT5 · Do you need a VPS for your MT5 Expert Advisor? · Risk management before automation
Educational content only, not financial advice. Trading involves risk and losses are possible. Automated trading does not guarantee profits.
