Understanding EA Settings: Complete Config Guide

Quick Answer

The most important EA settings to configure are: lot size/risk percentage (position sizing), stop loss (loss protection), take profit (gain locking), and magic number (trade identification). Start with the developer's default settings and only adjust lot size to match your account. Access settings via right-click chart > Expert Advisors > Properties > Inputs tab.

Configuring your Expert Advisor correctly is the difference between a profitable EA and an account-destroying one. I've seen traders take a perfectly good EA and wreck it by changing settings they didn't understand. This guide walks through every setting you'll run into: what it does, and whether you should touch it or leave it alone. The principles apply whether you're setting up Golden Viper EA or any other Expert Advisor.

How to Access EA Settings

There are two ways to access your EA's input parameters on MT4/MT5:

Method 1: When First Attaching the EA

  • Drag the EA from the Navigator window onto a chart
  • The properties dialog opens automatically
  • Click the Inputs tab to see all configurable parameters
  • Modify values and click OK to start the EA

Method 2: While the EA Is Running

  • Right-click the chart where the EA is active
  • Select Expert Advisors > Properties
  • Click the Inputs tab
  • Change values and click OK (EA restarts with new settings)

Accessing Settings on MT5

MT5 works the same way as MT4 for opening the Inputs tab, but it separates parameters differently. Look for a dedicated Inputs page inside the Expert Advisor properties window, plus a separate Settings tab that controls trading permissions (Algo Trading, allow live trading, allow DLL imports) and a Dependencies tab for any linked files. If your EA doesn't appear to be trading at all, check the Settings tab first -- a disabled "Algo Trading" toggle is one of the most common reasons an EA sits idle even when its Inputs are configured correctly.

Saving and Reusing Settings Presets

Once you've configured an EA the way you want it, save the configuration as a .set file instead of re-entering values by hand every time. In the Inputs tab, click Save to export the current parameter set, and Load to bring it back after reinstalling the platform, moving to a new VPS, or applying the same configuration to a second account. This also gives you a clean rollback point: if a settings change makes performance worse, you can reload the last known-good file instead of trying to remember what you changed by hand. The MQL5 documentation covers how input parameters and presets are structured if you want the full technical reference.

Core Settings Explained

Every EA has some version of these settings. It's worth knowing what each one does before you go live:

SettingWhat It DoesTypical DefaultShould You Change?
Lot SizeFixed position size per trade0.01-0.10Yes -- match to your account
Risk %Auto-calculates lot from balance1-2%Yes -- match your risk tolerance
Stop LossMaximum loss per trade (in pips)Varies by EAUsually no -- keep default
Take ProfitTarget profit per trade (in pips)Varies by EAUsually no -- keep default
Magic NumberUnique ID for the EA's tradesRandom/set by developerOnly if running multiple EAs
Max SpreadMaximum spread to open trades30-50 pointsRarely -- lower if ECN broker
SlippageMaximum allowed slippage3-10 pipsRarely

Lot Size vs Risk Percentage

Most EAs offer either fixed lot sizing or risk-based auto lot sizing. Choose one:

  • Fixed lot: The same lot size on every trade, regardless of account balance. Simple, but it doesn't scale as your account grows.
  • Risk percentage: The EA works out lot size from your balance and stop loss distance, so it scales automatically as your account changes. This is what most traders should use.

For detailed lot size calculations by account size, see our position sizing calculator.

Understanding Lot Sizes: Standard, Mini, and Micro

A standard lot represents 100,000 units of the base currency, a mini lot is 10,000 units, and a micro lot is 1,000 units. Most retail brokers quote gold using the same lot terminology as forex pairs, but the actual contract size and pip value for XAUUSD vary from broker to broker, so don't assume a 0.01 lot means the same dollar risk on every platform. Check your broker's contract specification page before sizing a live account, and see Investopedia's overview of how lots work if position sizing terminology is new to you.

Max Spread and Slippage in Practice

The max spread setting exists to stop the EA from opening a trade when the market is unusually illiquid -- for example, seconds after a major news release or right at the weekly open, when spreads can widen to several times their normal size. Set this too low and the EA will skip valid setups on a broker that naturally runs a wider average spread; set it too high and you lose the protection it's meant to provide. The same logic applies to slippage, which is the gap between the price your EA requested and the price your broker actually filled -- a byproduct of the bid-ask spread and order execution speed. A few points of slippage on a fast-moving gold market is normal; if you're seeing it on every single trade, that's usually a broker or VPS latency issue rather than a settings problem.

Why Most Settings Should Stay at Default

It's tempting to treat every input parameter as something to optimize, but most EA developers have already run their strategy logic (indicator periods, entry and exit rules, stop distances) through extensive backtesting and forward testing before release. Changing those values without repeating that process risks fitting your settings to a narrow slice of recent price action that won't repeat going forward. If you want to experiment, run any change through the platform's built-in Strategy Tester against historical data first, and treat the account-facing settings -- lot size, risk percentage, magic number -- as the only ones you should be adjusting freely without testing.

Pre-optimized settings included.Golden Viper EA -- just set your risk level and trade.
Get Access →

Risk Management Settings

Stop Loss

The stop loss is your maximum acceptable loss per trade. Never disable it. An EA without a stop loss will eventually blow your account during a Black Swan event or flash crash.

  • Fixed stop loss: Set distance in pips (e.g., 300 pips for XAUUSD)
  • ATR-based stop loss: Adapts to current volatility using Average True Range
  • Percentage-based: Closes if loss reaches X% of the trade's value

Whichever type your EA uses, understand what "maximum acceptable loss" means in dollar terms before you go live: multiply the stop distance in pips by your lot size's pip value. For a deeper look at how the Average True Range indicator is calculated, and why it's commonly used for volatility-adaptive stops, see Investopedia's guide to ATR.

Take Profit

The take profit is your target gain per trade. Some EAs use fixed take profit while others use dynamic exits based on indicators or trailing stops.

Trailing Stop

A trailing stop moves your stop loss in the direction of profit, locking in gains as the trade moves favorably. Settings typically include:

  • Trail start: Minimum profit before trailing begins (e.g., 100 pips)
  • Trail step: How frequently the stop moves (e.g., every 10 pips)
  • Trail distance: How far behind the current price the stop sits

Maximum Drawdown

Some EAs include an emergency stop that halts trading if account drawdown exceeds a threshold (e.g., 20%). This is an excellent safety feature. Set it to a level you're comfortable with, typically 15-25% of your account. If you're unfamiliar with how drawdown is actually measured (a peak-to-trough decline in account equity, not just the size of a single losing trade), Investopedia's breakdown of drawdown is worth reading before you set this threshold.

A Simple Position-Sizing Formula

If your EA offers risk-percentage sizing, it's calculating lot size roughly like this: Lot Size = (Account Balance × Risk %) ÷ (Stop Loss in Pips × Pip Value). On a $2,000 account risking 2% with a 300-pip stop loss on XAUUSD, the EA is solving for the lot size that puts $40 at risk if the stop is hit -- it isn't picking a lot size and then hoping the loss stays small. Understanding this formula makes it obvious why widening the stop loss without changing anything else automatically shrinks the position size the EA will take, and vice versa. The two settings are linked, not independent, so changing one without considering the other can quietly change your real risk per trade.

Correlation Risk When Running Multiple EAs or Pairs

If you run more than one EA, or the same EA on more than one gold-correlated instrument, your real risk per trade isn't just what each EA's settings say individually. Instruments that tend to move together (gold and silver often do, and gold and certain currency pairs move together during risk-off periods) can multiply your effective drawdown if they all lose at the same time. Investopedia's explanation of correlation is a useful starting point if this concept is new. A practical rule: if you're running multiple EAs or correlated pairs, reduce the per-trade risk percentage on each one so your combined exposure still matches what you'd accept from a single EA running alone.

Advanced Settings

Session Filters

Many gold EAs let you restrict trading to specific sessions. For XAUUSD, the most profitable sessions are London (08:00-16:00 GMT) and New York (13:00-22:00 GMT). Sticking to these hours cuts your exposure to the low-liquidity Asian session, where spreads tend to widen. Learn more in our gold trading hours guide. For the official trading schedule and contract specifications behind gold futures, CME Group publishes the current gold contract details, and the World Gold Council's Goldhub tracks broader market data if you want context beyond your broker's own session hours.

News Filters

Some EAs can detect high-impact news events and pause trading to avoid volatility spikes. This is valuable for gold EAs because XAUUSD reacts violently to Fed decisions, NFP, and CPI data. If your EA doesn't include a built-in filter, an economic calendar showing scheduled release times lets you manually widen your max spread and slippage tolerance, or simply sit out, around events you know will move the market sharply.

Order Execution and Filling Settings

Some EAs expose an execution mode or "filling type" setting (Fill or Kill, Immediate or Cancel, Return) that controls how the broker is allowed to fill an order relative to the requested price. On an ECN or STP broker with variable spreads, a filling type that's too strict can cause otherwise valid orders to be rejected during fast-moving markets. This setting rarely needs touching, but if your EA is logging repeated "order rejected" errors on a broker known for tight execution, it's worth checking against your broker's supported filling modes rather than assuming the EA itself is broken.

Time Zone Settings: Broker Time vs GMT

Session filter times are usually entered in either GMT or your broker's server time, and the two are not the same -- broker servers commonly run two to three hours ahead of GMT depending on daylight saving conventions, and that offset itself shifts twice a year. If your session filter seems to be trading at the wrong hours, check whether the input field expects GMT or server time before assuming the filter is broken, and re-verify the offset after daylight saving changes in March and November.

Magic Number

The magic number is a unique integer that tags every trade the EA opens. It is critical when running multiple EAs on the same account:

  • Each EA must have a different magic number
  • If two EAs share a magic number, one may close the other's trades
  • Set to 0 only if the EA should manage manually opened trades (rare)

Testing Settings Changes Safely

Any time you change something beyond lot size or risk percentage, validate the change before it touches a live account. There are three stages worth going through in order, and skipping straight to live trading with an untested change is how small settings mistakes turn into account-level damage.

Demo Account First

Run the modified settings on a demo account for at least a few weeks, ideally through a mix of quiet and volatile market conditions. A demo account won't perfectly replicate live execution -- spreads and slippage tend to be more forgiving on demo servers -- but it will catch obvious configuration errors, such as incorrect lot sizing, a magic number typo, or a filter that never triggers, before they cost real money.

Backtesting With the Strategy Tester

MT4 and MT5 both include a built-in Strategy Tester that replays historical price data against your EA's logic and settings. It's the fastest way to see how a specific change would have performed across past market conditions, though results depend heavily on the quality of the historical tick data your broker provides, and can overstate performance if you tune settings to fit the test period rather than general market behavior. The MQL5 documentation covers how the tester's modeling quality and optimization tools work if you want to go deeper on the mechanics.

Forward Testing Before Scaling Up

Once a change passes demo testing and backtesting, introduce it to a live account gradually. Start at a reduced risk percentage, confirm behavior matches what you saw in testing, and only then move it to your normal risk level. This staged approach catches the gap that sometimes exists between backtested and live results, which can come from execution differences, spread variations, or simply a change in market conditions since the historical test period.

Settings Mistakes to Avoid

MistakeConsequencePrevention
Disabling stop lossUnlimited loss on any tradeNever set stop loss to 0
Risk percentage too highAccount blown during losing streakKeep at 1-3% maximum
Same magic number on two EAsEAs interfere with each otherAssign unique numbers
Changing strategy parametersBreaks the tested edgeKeep indicator periods at defaults
Wrong timeframeEA logic does not match chartUse the developer-specified timeframe
Max spread too lowEA never opens tradesSet above broker's typical spread

Golden rule: If you do not understand what a setting does, leave it at the default value. EA developers optimize these parameters through extensive testing. Random changes almost always make performance worse. If you want to optimize, use the Strategy Tester first.

Account SizeRisk %Approx Lot (XAUUSD)Max Open Trades
$5002%0.032-3
$1,0002%0.073-4
$5,0002%0.333-5
$10,0001-2%0.33-0.673-5
$25,000+1%0.83+3-5

These are starting recommendations. Adjust based on your EA's specific stop loss size and your personal risk tolerance. For complete risk management strategies, read our risk management guide.

Red Flags: Misleading Settings Claims From Other Vendors

Because EA settings look technical, they're a favorite place for disreputable vendors to make claims that don't hold up. Watch for language like a "guaranteed no-loss setting," a "secret risk-free configuration," or a specific settings combination marketed as incapable of losing -- no combination of lot size, stop loss, or filter settings changes the fact that every trade carries risk, and any product claiming otherwise isn't being straight with you. The CFTC and the FTC both publish consumer guidance on identifying trading-related scams, and a recurring pattern in both is vendors using technical-sounding settings language to imply a level of safety the product can't actually deliver. A legitimate EA's settings control risk management -- they don't remove risk, and no one selling you settings should claim they do.

Frequently Asked Questions About EA Settings

What are the most important EA settings?

Lot size or risk percentage (position sizing), stop loss (loss protection), take profit (gain locking), and magic number (trade identification). Get these four right and your EA will function safely.

What is a magic number in EA trading?

A unique identifier an EA assigns to its trades, allowing multiple EAs to run on the same account without interfering. Each EA needs a different magic number to prevent one from closing another's trades.

Should I change the default EA settings?

Only change lot size or risk percentage to match your account. Keep strategy parameters (indicator periods, stop loss distance, etc.) at defaults unless you have backtested changes thoroughly.

What risk percentage should I set?

1-2% for conservative, 2-3% for moderate. Never exceed 5%. Most professional EA traders use 2% per trade for balanced growth and safety.

How do I access and change EA settings on MT4?

Right-click the chart > Expert Advisors > Properties > Inputs tab. Modify values and click OK. The EA restarts with the new settings immediately.

What is slippage and should I change my EA's slippage setting?

Slippage is the gap between the price your EA requested and the price you actually got filled at, caused by market movement between order placement and execution. A few points on a fast-moving gold market is normal and usually not worth adjusting. Only raise the slippage tolerance if your EA is regularly rejecting valid orders with "requote" or "slippage exceeded" errors on a broker with typically fast execution.

Can I run multiple EAs with different settings on the same account?

Yes, as long as each EA has a unique magic number so they don't interfere with each other's trades. Just be aware that your real per-trade risk is combined across all EAs, not calculated separately by each one, so consider reducing the risk percentage on each EA to keep your total exposure reasonable.

What happens if I set take profit too tight or too wide?

A take profit that's too tight closes winning trades before they reach their full potential, lowering your average win size relative to losses. One that's too wide means price often reverses before reaching the target, turning winning trades into losers or breakeven exits. Most EA developers test their default take profit against the EA's specific entry logic, so this is usually one of the settings worth leaving alone unless you've backtested an alternative.

Should I change settings during high-impact news events like FOMC or NFP?

If your EA includes a built-in news filter, let it handle this automatically rather than manually pausing trading, since manual intervention introduces its own timing risk. If it doesn't have a news filter, check an economic calendar for major releases that historically move XAUUSD sharply, and consider whether widening your max spread and slippage tolerance temporarily is safer than leaving default settings that might reject valid fills during the volatility.

What's the difference between backtesting and forward testing a settings change?

Backtesting replays historical price data through your settings using the Strategy Tester built into MT4/MT5 to see how they would have performed in the past. Forward testing runs the changed settings on a demo or reduced-risk live account against real-time market conditions going forward. Backtesting is faster and free of live risk, but forward testing is what actually confirms the change holds up outside of hindsight-biased historical data.

Myfxbook Verified

Easy Setup with Golden Viper EA

+€1,485Net · 6-mo (verified)
56%Win Rate (51/91)
24/5Automated
Starting at $199 one-time
Get Lifetime Access →
✓ Instant download✓ Full feature access✓ MT4 & MT5 compatible
DC

Daniel Cole

Daniel Cole writes step-by-step MetaTrader and EA tutorials for Golden Viper EA.

Myfxbook VerifiedVerified live since Jan 2026Public track record

Let Golden Viper EA trade gold for you

Automated XAUUSD trading for MT4 & MT5, verified live on Myfxbook. One-time $199, lifetime access.

Get Lifetime Access — $199