Skip to main content

Customize an MT5 EA Without Coding: Inputs, Presets and Set Files

Customizing an MT5 Expert Advisor doesn't require a programmer. Learn how to safely adjust parameters, manage .set files, and optimize your trading robots for live markets.

Isabella Torres

15 min read

Customize an MT5 EA Without Coding: Inputs, Presets and Set Files Watch the video

This article

8sections 15min

  1. 01 What You'll Learn, minute 2, about 1 min
  2. 02 How Does the MT5 EA Inputs Tab Work?, minute 2, about 2 minThe MT5 Inputs tab is a visual dashboard that exposes pre-compiled MQL5 variables, allowing you to alter the EA's behavior without editing…
  3. 03 How Do You Create, Save, and Load MT5 .set Preset Files?, minute 4, about 2 minYou create, save, and load .set preset files by clicking the "Save" and "Load" buttons in the EA Inputs dialog, which stores these modular…
  4. 04 Why Does Modifying EA Inputs Cause 'Zombie Trades'?, minute 6, about 2 minModifying EA inputs causes "zombie trades" because changing a parameter triggers a terminal reboot of the EA, potentially causing it to…
  5. 05 How Do You Test and Calibrate Presets in the MT5 Strategy Tester?, minute 8, about 2 minYou test and calibrate presets in the MT5 Strategy Tester by configuring the optimization grid using the Value, Start, Step, and Stop…
  6. 06 Editing .set Files in Plain Text for Multi-Chart EA Deployment, minute 11, about 2 minEditing .set files in plain text allows you to open these configuration files in editors like Notepad to quickly make batch adjustments…
  7. 07 Conclusion, minute 12, about 1 minCustomizing an MT5 Expert Advisor does not require writing a single line of MQL5 code. By mastering the Inputs window, traders gain visual…
  8. 08 Frequently Asked Questions, minute 13, about 2 minA .set file is a plain-text configuration file used in MetaTrader 5 to save and load input parameters for Expert Advisors and custom…

Listen to this article

Also on Apple Podcasts

Listen (audio)

To customize an MT5 EA without coding, press F7 on your active chart to access the Inputs tab, where you adjust read-only constants like risk sizing and indicator triggers. You can save, backtest, and deploy these configurations across multiple pairs using .set preset files stored directly in your terminal's MQL5/Presets folder.

You have just downloaded a promising Expert Advisor, but its default settings are chewing through your account. You might think you need to hire an MQL5 programmer to fix it, but the solution is already built into your platform. By mastering the Inputs tab and .set files, you can completely overhaul how an EA behaves without touching a single line of code. Let's break down how to safely tweak parameters, prevent orphaned server trades, and optimize your presets for real-market conditions.

What You'll Learn

How Does the MT5 EA Inputs Tab Work?

The MT5 Inputs tab is a visual dashboard that exposes pre-compiled MQL5 variables, allowing you to alter the EA's behavior without editing its underlying source code.

When you press F7 on an active chart running an Expert Advisor, you are greeted by the Inputs window. Think of this as the control panel for your trading robot. The developer has specifically chosen which variables to expose here, giving you the power to adjust the strategy's mechanics safely.

A diagram showing the hierarchy of EA inputs: Trading Parameters (risk sizing) on the left, Indicator Triggers (MA
MT5 EA input parameters are structured into risk and sizing, indicator triggers, and operational safeguards.

Deconstructing the Input Hierarchy: Risk vs. Triggers vs. Safety

Not all inputs are created equal. A well-designed EA usually groups parameters into three distinct categories:

  1. Trading Parameters: These dictate your exposure. You will find settings for fixed lot sizing, account risk percentages, and ATR stop-loss multipliers.
  2. Indicator Triggers: These control the logic of when the EA trades. Common inputs include moving average periods, RSI overbought/oversold levels, or MACD signal line shifts.
  3. Operational Safeguards: These protect your account from execution anomalies.
Example: If your EA calculates position size dynamically and you set the risk parameter to 2%, a $5,000 account will risk exactly $100 per trade. If you enter EUR/USD at 1.0850 with a stop at 1.0820 (a 30-pip risk), the EA will automatically size the trade to roughly 0.33 lots to maintain that $100 limit.

Configuring Slippage Caps, Spread Filters, and Magic Numbers

Operational safeguards are your first line of defense against poor execution conditions. A maximum allowable spread filter prevents the EA from opening trades during the daily rollover when spreads widen dramatically.

Equally important is the Magic Number. This is a unique identifier the EA attaches to every order it places. If you plan on running several EAs on one account, assigning a distinct Magic Number to each chart ensures that Robot A does not accidentally close the trades opened by Robot B.

How Do You Create, Save, and Load MT5 .set Preset Files?

You create, save, and load .set preset files by clicking the "Save" and "Load" buttons in the EA Inputs dialog, which stores these modular configurations in the terminal's MQL5/Presets folder.

Manually typing in 30 different parameter values every time you attach an EA to a new chart is a recipe for disaster. A single typo—like entering a 500-pip stop loss instead of a 50-pip stop loss—can ruin your week. This is where .set files come in.

Exporting and Importing Presets in MQL5/Presets

Once you have dialed in your perfect settings in the Inputs tab, click the "Save" button at the bottom right of the window. MT5 will automatically route you to the default terminal storage path: your terminal data folder > MQL5 > Presets.

Name your file clearly, such as TrendCatcher_EURUSD_M15_LowRisk.set. The next time you open a EUR/USD chart, simply attach the EA, click "Load," select your file, and every parameter will instantly snap to your saved values.

Calibrating Pair-Specific Setups (EURUSD vs. XAUUSD)

A low-volatility EURUSD chart with a tight stop loss on the left, and a high-volatility XAUUSD chart with a wider dynamic
Configuration files route distinct stop loss and take profit parameters to low-volatility EURUSD and high-volatility XAUUSD.

You cannot use the exact same settings on a sluggish currency pair that you use on a highly volatile commodity. You must tailor distinct .set configurations based on asset volatility profiles.

Pro Tip: Apply tighter indicator triggers and smaller stop losses for low-volatility majors like EUR/USD. Conversely, use wider dynamic stops and larger ATR multipliers for volatile instruments like XAU/USD to avoid premature stop-outs.

For instance, an RSI overbought trigger of 70 might work perfectly for a clean chart scalping setup on EUR/USD, but XAU/USD routinely pushes past 80 during strong trends. Saving a dedicated XAUUSD.set file ensures your robot respects the unique rhythm of gold.

Why Does Modifying EA Inputs Cause 'Zombie Trades'?

Modifying EA inputs causes "zombie trades" because changing a parameter triggers a terminal reboot of the EA, potentially causing it to lose track of open server-side positions if core logic is altered.

Many traders panic when they tweak an input setting on a live chart, only to watch their EA stop managing an open trade. To understand why this happens, you need to look at how MT5 handles runtime changes.

The MQL5 Lifecycle: REASON_PARAMETERS (Code 5) and OnInit() Reboots

When you click "OK" on the Inputs tab after making a change, MT5 does not just smoothly update the variable in the background. According to official MetaQuotes documentation, the terminal triggers an internal deinitialization sequence called REASON_PARAMETERS (uninit reason code 5).

The terminal completely unloads the EA using the OnDeinit() function, then immediately restarts it via the OnInit() function. During this split-second reboot, your active trades remain open on the broker's trade server.

Tracking Magic Numbers to Prevent Orphaned Server-Side Positions

A "zombie trade" occurs when the EA reboots and no longer recognizes the position it opened just minutes ago. This most commonly happens if you change the Magic Number while a trade is active. The EA wakes up, scans the server for trades matching its new Magic Number, finds none, and ignores the open trade associated with the old Magic Number.

Warning: Never change an EA's Magic Number while it has open positions.

If you find your EA behaving strangely after a parameter change, cross-reference the logs in your MT5 Journal and Experts tabs to verify that the EA successfully reinitialized and re-acquired its server-side orders.

How Do You Test and Calibrate Presets in the MT5 Strategy Tester?

You test and calibrate presets in the MT5 Strategy Tester by configuring the optimization grid using the Value, Start, Step, and Stop columns to find robust parameter combinations before live deployment.

Before you trust a new .set file with real capital, you must stress-test it. The MT5 Strategy Tester is designed specifically for this purpose, allowing you to run thousands of parameter combinations against historical tick data.

A workflow diagram illustrating the REASON_PARAMETERS lifecycle: A user clicks 'OK' on inputs
The MT5 EA parameter reload lifecycle moves from input confirmation through OnDeinit termination to OnInit reactivation.

Navigating the Value, Start, Step, and Stop Optimization Grid

When you open the Strategy Tester's Inputs tab, you will see four distinct columns next to each variable:

  • Value: The current setting (used for single backtests).
  • Start: The initial value for the first optimization run.
  • Step: The incremental variance added during each subsequent run.
  • Stop: The boundary limit where the optimization ends.

If you want to find the best moving average period between 20 and 50, you would set the Start to 20, the Step to 5, and the Stop to 50. The tester will run simulations for periods of 20, 25, 30, 35, 40, 45, and 50, allowing you to identify which parameter yields the most stable equity curve.

Calibrating Presets for Real Execution and Commission Models

A common mistake is over-fitting parameters to perfect, frictionless historical data. A preset that looks flawless with zero spreads might collapse in a live environment.

Stress-test your presets against realistic execution environments. If your EA executes high-frequency trades, spread drag will heavily impact your edge. This is why testing on transparent infrastructure like NX Flex is vital. With NX Flex, you can dial in a 0.0 pip markup (the raw market spread still applies) alongside commissions ranging from $9 down to $0 per lot. If your preset relies on tight scalping margins, calibrating it against the exact commission structure you intend to trade—such as the $10,000 crown tier's zero commission and raw spread—ensures your backtest aligns with reality.

Editing .set Files in Plain Text for Multi-Chart EA Deployment

Editing .set files in plain text allows you to open these configuration files in editors like Notepad to quickly make batch adjustments across multiple parameters without opening individual MT5 chart dialogs.

While the MT5 Inputs tab is user-friendly, managing dozens of presets for a large portfolio can become tedious. Advanced traders often bypass the platform entirely when making bulk updates.

Inspecting the Anatomy of a Plain-Text .set File

If you navigate to your MQL5/Presets folder, right-click a .set file, and open it with Notepad or VS Code, you will see a simple list of text. The underlying syntax is a straightforward Variable=Value format.

It looks like this:
Lots=0.10
TakeProfit=50
StopLoss=25
MagicNumber=999111

A side-by-side comparison showing the MT5 Strategy Tester optimization grid (Value, Start, Step
MT5 Strategy Tester input values map directly to plain-text parameter lines in a raw .set file.

Because it is plain text, you can conduct rapid find-and-replace adjustments. If you decide to cut your risk in half across 20 different currency pairs, you can open all 20 .set files in a text editor and change RiskPercent=2.0 to RiskPercent=1.0 in seconds.

Batch Adjustments, Version Control, and Rapid Portfolio Scaling

Treat your .set files like software source code. Implement a structured version-control habit for your algorithmic portfolio.

Maintain timestamped preset archives across diverse asset classes. Instead of constantly overwriting your main EURUSD.set file, save iterations like EURUSD_v1_Oct2026.set. If market conditions shift and a new parameter tweak fails, you can instantly roll back to a previous, proven version of your configuration.

Conclusion

Customizing an MT5 Expert Advisor does not require writing a single line of MQL5 code. By mastering the Inputs window, traders gain visual control over position sizing, indicator thresholds, and crucial safety parameters. Handling .set preset files properly inside the MQL5/Presets directory allows for effortless scaling across multiple asset classes while eliminating setup mistakes.

Understanding the terminal's internal REASON_PARAMETERS lifecycle protects active positions from becoming unmanaged zombie trades when parameters change on live charts. Once calibrated in the Strategy Tester's parameter matrix, your presets are ready for real-market conditions.

To maximize EA performance and eliminate spread drag, test your custom presets on transparent trading infrastructure like NX Flex, where you can dial in a 0.0 pip markup (the raw market spread still applies) and competitive commissions. Export your current EA preset file today, inspect its parameters in a plain-text editor to verify your Magic Numbers, and backtest it under raw execution conditions.

Trading CFDs involves risk of loss; better terms do not change market risk.

Frequently Asked Questions

What is an MT5 .set preset file?

A .set file is a plain-text configuration file used in MetaTrader 5 to save and load input parameters for Expert Advisors and custom indicators. It allows traders to quickly apply pre-configured strategies to different charts without manually re-entering every value.

How do I fix EA zombie trades in MT5?

Zombie trades occur when an EA loses track of open positions, usually because the Magic Number was altered while a trade was active. To fix this, revert the EA's Magic Number to the original value used when the trade was opened, or manually manage and close the orphaned position.

Where are MT5 EA presets saved?

By default, MT5 saves all .set preset files in the terminal's data folder under the MQL5/Presets directory. You can access this folder directly through the platform by clicking "File" > "Open Data Folder" and navigating to the Presets folder.

Can I change EA settings while a trade is open?

Yes, but doing so triggers a terminal reboot of the EA. While the server-side trade remains open, the EA will briefly shut down and restart. Ensure you do not change core identifiers like the Magic Number, or the EA will fail to recognize the open trade upon restarting.

End of article

General information and education, never investment advice.

CFDs are complex, leveraged instruments with a high risk of losing money rapidly. 64% of retail investor accounts lose money trading CFDs with this provider.

Written by Isabella Torres.

Derivatives Analyst

All articles by Isabella
Publisher
FXNX Global Markets Ltd
Company
Saint Lucia 2025-00128
Published
October 15, 2026

Next step

Now practise it,
on a demo.

Open an account and practise with virtual money on live prices. No deposit, no ID.

$10,000
Demo balance, ready on your first visit. Or pick $1,000 or $100,000.

Demo results don't predict live results.