MT5 Expert Advisor Settings Explained: What Each Input Does and How to Set It Safely

4 December 2026, 17:29
BK CORP CLUB (PTY) LTD
0
11
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. Setting it safely: Start lower than you think you need to. 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. On MT5 with a 5-digit broker, one pip = 10 points. 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.

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. Setting it safely: Use a different magic number for each EA and each chart instance.

Maximum spread

This input tells the EA the highest spread at which it is allowed to open a trade. If the spread is wider than the limit, the EA waits. Setting it safely: Set the maximum spread to roughly 1.5–2× the normal spread during the EA's usual trading hours.

Trading hours

Many EAs let you restrict the hours during which they open trades. This is usually expressed as server-time hours. Setting it safely: 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.

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. Always test any new settings on a demo account before applying them to a live account. No setting eliminates trading risk.