You install an EA, run it with the default parameters, and three days later your account is down 15%. The EA isn't broken. You just didn't understand what the settings were doing.
We see this in our support emails regularly. Traders spend hours choosing the right EA, install it in minutes, and skip the one step that matters most: reading the parameters. EA parameters are the steering wheel, accelerator, and brake. The car might be excellent, but if you don't know how to drive it, you're going off a cliff.
This guide covers the parameters you'll find in almost every EA, what they control, and what happens when you set them wrong.
Lot size: the parameter that matters most
LotSize directly controls how much risk you take on each trade. Get this wrong and nothing else matters.
The simplest option is a fixed lot size. Set it to 0.1 and the EA opens 0.1 lots every time, regardless of account balance. Clean and predictable, but it doesn't adapt. On a $1,000 account, 0.1 lots might be dangerously large. On a $50,000 account, it's too conservative.
Most serious EAs offer dynamic lot sizing, usually labeled RiskPercent or MoneyManagement. Instead of a fixed lot, you enter a percentage. Setting RiskPercent to 2 means each trade risks 2% of your account equity. The EA calculates the appropriate lot size based on your stop loss distance.
Example: $10,000 account, 2% risk per trade, 50-pip stop loss on EURUSD. The EA calculates: $200 risk / (50 pips × $10 per pip) = 0.4 lots. When the account shrinks after losses, the lot size automatically decreases. When it grows, the lot size increases. This is the position sizing formula applied automatically.
| Account (USD) | Risk % | Lot size at 50-pip SL (EURUSD) |
|---|---|---|
| $1,000 | 1–2% | 0.02–0.04 |
| $5,000 | 1–2% | 0.10–0.20 |
| $10,000 | 1–2% | 0.20–0.40 |
| $50,000 | 0.5–1% | 0.50–1.00 |
Larger accounts should use lower risk percentages. At $50,000, even 1% means risking $500 per trade. That's enough.
One parameter people skip: MaxLot. This caps the maximum lot size per trade, regardless of what the dynamic calculation produces. Set it to something your psychology can handle, not the maximum your broker allows. If the dynamic lot formula glitches during a volatility spike, MaxLot is your safety net.
Stop loss and take profit
StopLoss and TakeProfit are entered in pips or points, depending on the EA. The difference is 10x, and confusing them is one of the most common parameter mistakes.
If you type 50 and the stop loss on the chart shows 50 pips (5.0 for a 5-digit broker), the EA uses pips. If the stop loss shows 5 pips, the EA uses points and you'd need to enter 500 for a 50-pip stop. Check once by opening a test trade, and you'll know for future reference.
Reasonable stop loss ranges by strategy type
| Strategy | Typical SL range (pips) | Notes |
|---|---|---|
| Scalping | 10–20 | Fast in, fast out. Sensitive to spread and slippage. |
| Day trading | 30–80 | Holds for hours. Needs room to breathe. |
| Swing trading | 80–200 | Holds for days. Wider stop, lower frequency. |
| Grid / Martingale | No fixed SL per trade | Controls risk through layer count and total exposure. See our Martingale risk guide. |
The relationship between stop loss and take profit is your risk-reward ratio. A 50-pip stop with a 100-pip target gives you 1:2. Bigger isn't always better. A 1:3 ratio sounds great, but if the target is rarely hit, the strategy makes money on paper and loses it in live trading.
The expected payoff in the backtest report is more useful than the raw risk-reward ratio. Expected payoff = (average win × win rate) - (average loss × loss rate). If that number is positive, the EA has edge.
Magic number: why it exists and when it breaks things
The magic number is a label the EA attaches to every order it places. MetaQuotes' MQL5 documentation covers the technical implementation if you're curious about the internals. Think of it as a table number at a restaurant. The EA uses this number to identify which orders belong to it and which don't.
When does this cause problems? When you run two EAs on the same account and the same pair with the same magic number. EA A places an order. EA B sees that order, thinks it's one of its own, and closes it. Or modifies the stop loss. Or opens a hedge against it. The account turns into chaos.
The fix is simple: assign a unique magic number to each EA instance.
Rules of thumb:
- Different EAs on the same pair: different magic numbers
- Same EA on different pairs: different magic numbers (some EAs handle this internally, but it's safer to set it yourself)
- Never use 0. Many EAs treat magic number 0 as "manage all orders," which means it might interfere with manual trades or other EAs
- Write down which magic number you assigned to each setup. When something goes wrong months later, you'll need that reference
Time filters: when the EA is allowed to trade
Most EAs include StartHour and EndHour parameters (sometimes called TradingTime or SessionFilter). These control when the EA is allowed to open new positions. Orders already open are usually not affected.
Why limit trading hours? Because the forex market behaves completely differently depending on the session. The Asian session has lower volatility and is better for range strategies. The London-New York overlap has the highest volatility and works better for trend and breakout strategies. During major news releases (NFP, rate decisions), price can jump dozens of pips in seconds, which destroys strategies with tight stop losses.
The critical detail most people miss: these parameters use MT4/MT5 server time, not your local time. Server time is usually GMT+2 or GMT+3 depending on daylight saving time. If you want the EA to trade during the London-New York overlap (13:00–17:00 UTC), convert to server time first.
A quick way to check: look at the time displayed in the top-left corner of your MT4/MT5 chart. Compare it to UTC. The difference is your server offset.
Many EAs also include a FridayFilter that stops opening new positions after a certain hour on Friday, or closes all positions before the weekend. This protects against gap risk. If your strategy uses tight stops, enabling this is worth the missed trades. We keep Friday filters on for most of our EAs — the risk of a Monday gap wiping out a weekend position isn't worth the potential of a few extra pips.
Slippage and spread controls
MaxSlippage limits how much the fill price can differ from the requested price. If you set it to 3 and the broker tries to fill you at 4 pips worse than requested, the order is rejected instead.
On a properly located VPS, slippage is typically 0–2 pips. Setting MaxSlippage to 3–5 covers normal variation without rejecting too many orders.
MaxSpread is arguably more important. During low-liquidity periods (late-night sessions, holidays) and around major news events, spreads can spike to 5–10x their normal level. If EURUSD normally has a 1.2-pip spread, it might widen to 8+ pips during NFP. Opening a trade at that spread is like paying a hidden fee.
Set MaxSpread to roughly 2–2.5x the normal spread for your pair. For EURUSD: normal spread ~1.2 pips, set MaxSpread to 25–30 (in points). The EA skips trades when the spread is abnormally wide and trades normally the rest of the time.
These are "set it and forget it" parameters. You probably won't notice them 95% of the time. The other 5%, they save you real money.
Backtest parameters vs live parameters
A common mistake: find great parameters during backtesting, copy them to live, and get disappointed by worse results.
The reason is that backtesting is a simplified simulation. No slippage, no spread widening, no network delays. The backtest environment is always more favorable than reality.
Practical adjustments for going live:
Set the backtest spread to 1.5x the actual spread to build in a margin of safety. Don't use your tightest possible stop loss — add a few pips of buffer for live slippage. Start with half the lot size the backtest suggested and observe for 1–2 months. And always use "Every Tick" mode for backtesting, not "Open Prices Only." The difference in accuracy is significant, especially for strategies that trade on short timeframes. Our backtest guide covers this in detail.
The optimization trap
MT4's parameter optimization is powerful and dangerous in equal measure. You can test thousands of parameter combinations and find the set that produced the best results over the past 5 years. That set probably won't work going forward because it's overfitted to historical data.
How to check: optimize on 2016–2021 data, then run the winning parameters on 2022–2025 without changes. If performance drops by more than 40%, the parameters are memorizing the past rather than capturing a real pattern.
Good parameters are "roughly right," not "precisely perfect." If changing a stop loss from 48 to 52 makes the difference between profitable and losing, the strategy itself isn't robust enough. We test every EA we sell across a range of nearby parameter values to confirm this kind of robustness.
FAQ
Do I need to restart the EA after changing parameters?
No. In MT4/MT5, right-click the chart → Expert Advisors → Properties → Inputs tab. Change the values and click OK. Changes take effect immediately without reloading the EA. If you're loading a .set file, you do need to reload through the Load button.
Can the same EA run on multiple pairs?
Yes, but each pair probably needs different parameter values. EURUSD and GBPJPY have completely different volatility ranges. A 50-pip stop loss makes sense on EURUSD daily but might be too tight for GBPJPY. Always use different magic numbers on each chart. Our how to install EAs guide covers multi-chart setup.
Should I enable trailing stop?
Depends on the strategy. Trailing stops lock in profit as the trade moves in your favor, which works well with trend following strategies. In ranging markets, they get triggered too easily and cut winning trades short. Most trend EAs should have it on. Scalping EAs should have it off. Check what the EA developer recommends.
What should MaxOrders be set to?
For single-entry strategies (one trade at a time), 1–3 is enough. Grid and Martingale strategies need higher limits because they add positions deliberately. Whatever you set, make sure it aligns with the margin requirements. More open positions means more margin used, which means less buffer before a margin call. Check our realistic income expectations guide for how position count affects overall risk.
About the author: The FXTool team builds and tests MetaTrader trading tools daily. We run every EA we sell on live accounts and publish the results. This guide reflects what we've learned from building 50+ EAs and working with thousands of retail traders.
Forex trading involves significant risk and may result in total loss of capital. This article is for educational purposes only and is not investment advice. Understand the risks and consider your financial situation before trading.