Saved in this browser only.
In this tutorial
Before you start
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
.setfiles.
Steps
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.
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.
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.
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.
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.
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 thePresetsfolder. Load restores it later, and Reset returns every input to the developer's defaults.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
.setfile, 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