Forex Bots & EAs tutorial

How to Configure Expert Advisor Settings

Open an attached EA's settings, review the inputs that matter most for risk, and save your configuration as a .set file you can reload or share with support.

Intermediate About 20 min(estimate) 7 stepsPublished

Times are estimates — they vary with your computer, connection and experience.

Before you start

  • An EA installed and attached to a chart — see the MT5 or MT4 install tutorial.
  • The EA's documentation, which explains what each of its inputs does.
  • A demo account for trying new settings.

What you'll learn

  • Reopen an EA's properties at any time.
  • Recognise the common inputs and the units they use.
  • Save, load and reset settings with .set files.

Steps

  1. Step 1: Open the EA's properties

    Click the chart the EA is attached to and press F7, or right-click the chart and choose Expert Advisors → Properties. Open the Inputs tab.

  2. Step 2: Find the position-size setting

    Most EAs use either a fixed lot (for example 0.01) or risk-based sizing (a percentage of balance per trade). Start with the smallest size your account allows while you learn how the EA behaves.

    Settings that multiply lot size after a loss (martingale) or add positions as price moves against you (grid/averaging) concentrate risk in rare but severe losses. Make sure you understand them before changing their values.

  3. Step 3: Check the units of stop-loss and take-profit

    Inputs may be in pips or in points. On a 5-digit EUR/USD quote, 1 pip = 10 points, so a stop-loss of "20" means very different distances depending on the unit. The documentation (or the input's name) should say which one is used.

  4. Step 4: Give each copy a unique magic number

    The magic number labels the trades an EA opens so it only manages its own. If you run the same EA on several charts, give each chart a different magic number unless the developer says otherwise.

  5. Step 5: Review filters and limits

    Many EAs also have:

    • A maximum spread — the EA won't open trades when the spread is wider.
    • Trading hours or session filters (check whether they use broker server time).
    • Slippage or maximum deviation for order execution.
    • Limits such as maximum open trades or a daily loss stop.
  6. Step 6: Save your settings as a .set file

    On the Inputs tab, click Save and give the file a descriptive name (for example eurusd-h1-demo.set). It's stored in the Presets folder. Load restores it later, and Reset returns every input to the developer's defaults.

  7. Step 7: Apply and check the log

    Click OK. Most EAs re-initialise with the new values; the Experts tab (Ctrl+T) should show the EA reloading without errors.

Expected result

The EA runs with inputs you understand, your configuration is saved as a .set file in Presets, and the Experts tab shows it re-initialised without errors.

Troubleshooting

"Invalid volume" errors after changing the lot size
The size is below the broker's minimum, above its maximum, or not a multiple of its volume step. Check the symbol's Specification in Market Watch.
"Invalid stops" errors
The stop-loss or take-profit is inside the broker's minimum distance, or you entered pips where the EA expects points. Recheck the unit.
Settings are lost after restarting MetaTrader
Save a .set file, and save your chart layout as a profile or template so the EA and its settings come back together.

Next tutorial

How to Run a Strategy Backtest in MT5

Run an Expert Advisor backtest in the MetaTrader 5 Strategy Tester: choose the modelling mode, deposit and delays, then read the report and graph honestly.

Continue

Related tutorials

All tutorials
  • Testing & RiskBeginner

    How to Test a Forex Bot on a Demo Account

    Forward test an Expert Advisor on a demo account: open a demo, mirror your real settings, keep a simple log and compare results with the backtest.

    About 25 min(estimate) 7 steps
  • Forex Bots & EAsIntermediate

    How to Troubleshoot an EA That Isn't Trading

    Work through the checks that fix most idle Expert Advisors in MT4 and MT5: permissions, market hours, the logs, broker rejections, filters and inputs.

    About 20 min(estimate) 8 steps