.set File (MetaTrader EA Preset)
Definition
A .set file is a MetaTrader preset file containing saved EA parameter values. Traders save optimised parameter sets to .set files for easy switching between configurations (e.g. one set for EURUSD, another for GBPUSD; one set for trend regimes, another for chop). Vendors distribute .set files with their EAs as recommended starting configurations.
In-depth: .set File (MetaTrader EA Preset)
The .set file is MetaTrader's mechanism for saving and loading EA configuration. The format is a plain-text file in the EA's `MQL5/Presets/` directory (or `MQL4/Presets/` for MT4) containing one `parameter_name=value` line per EA input.
File format example: ``` ; Scalperology EURUSD M5 default ; Generated 2026-05-17 LotSize=0.10 StopLossPips=20 TakeProfitPips=15 MaxSpread=2 NewsFilterEnabled=true NewsFilterMinutesBefore=15 NewsFilterMinutesAfter=15 MagicNumber=12345 MaxOpenTrades=3 ```
Lines starting with `;` are comments and ignored by MetaTrader.
Common vendor patterns: - Pair-specific files: `MyEA_EURUSD.set`, `MyEA_GBPUSD.set` — different parameters tuned for each pair's characteristics - Timeframe-specific files: `MyEA_M5.set`, `MyEA_H1.set` — different parameters for different chart timeframes - Regime-specific files: `MyEA_Conservative.set`, `MyEA_Aggressive.set` — different risk profiles - Broker-specific files: `MyEA_ICMarkets.set`, `MyEA_Pepperstone.set` — different parameters tuned for each broker's spread/execution characteristics
Management best practices: 1. Version control: name files with date/version, e.g. `MyEA_EURUSD_2026Q2.set`. Keep previous versions for rollback. 2. Documentation: include comment lines (`;`) at the top of each file documenting the source, date, expected performance, and any caveats. 3. Optimisation results: after parameter optimisation, save the best parameter set as a .set file with descriptive name. 4. Sharing: .set files can be shared between traders but should be combined with documentation of what brokers/pairs they were optimised for.
Loading and applying: - In MetaTrader: open EA input dialog, click 'Load', select .set file from Presets folder - Programmatically: `OnInit()` can read .set values via `FileOpen()` and parse the format, but this is unusual; the standard pattern is for users to load via UI
Limitations: - .set files store only input parameters, not internal EA state. State (open positions, equity history, etc.) is not transferable via .set. - Parameter names must match exactly between .set file and EA. A renamed or removed parameter causes load failure or silent default-value behaviour. - No encryption — .set files are plain text, readable by anyone with file access. For commercial EAs, the parameter values represent the vendor's optimisation work; some vendors obfuscate names or distribute .set files separately from licensing.
MQL5 Cloud network: .set files for popular EAs are often shared in MQL5 community forums; quality varies and most are not optimised for the specific user's broker conditions.