MeanRevert EA
- 专家
- Ionut-alexandru Margasoiu
- 版本: 2.3
- 更新: 10 四月 2026
- 激活: 5
Overview
MeanRevert EA trades the statistical tendency of price to return toward its Daily SMA after extended deviations. When the D1 close moves more than a configured percentage away from the SMA, the EA opens a position in the reversion direction and exits when price approaches the mean again — capturing the snapback move.
The EA supports 9 instruments with fully optimised, hardcoded parameter sets per symbol and risk level. No manual configuration required — attach, select your preset, and the EA is ready to trade.
Supported Symbols
US30 · US500 · USTEC · EURUSD · GBPUSD · GBPJPY · EURJPY · USDJPY · AUDCAD
How It Works
At each new Daily bar close, MeanRevert measures the deviation between the closing price and the Daily SMA. If deviation exceeds the entry threshold for the detected symbol, a pending signal is stored. After a 1h10m guard period (avoiding the illiquid market open), the order is executed at market. The position is held until price returns within the exit threshold of the SMA, at which point it closes with a market order on the next tick.
An optional scale-in allows a second position to be added if price deviates further by a configurable multiplier — averaging into the trade at a more extreme level.
Key Features
- Daily SMA mean reversion — long, short, or both directions
- 9 supported symbols with individually optimised parameter sets for each risk level
- Three risk presets per symbol (Low / Medium / High) — SL%, Risk%, MA period and deviation threshold all hardcoded per instrument, no setfile needed
- Auto magic number — unique magic number assigned per symbol automatically on init; no manual configuration required, run on all 10 charts without touching any setting
- Manual preset — override any parameter individually while keeping symbol auto-detection active
- Configurable entry deviation % and exit proximity %
- Optional scale-in entry at EntryDev × multiplier
- Percentage-based breakeven and trailing stop
- Risk % of balance — per-symbol, per-preset level
- Retry logic with exponential backoff for transient broker errors
- Fixed-dollar circuit breaker (daily + total drawdown, high-water mark)
- Daily SMA drawn on chart at any timeframe, including backtest visual mode
- Incremental P&L tracking via OnTradeTransaction — no HistorySelect per tick
- Full HUD with real-time deviation, signal state, position details, win rate, pending signal countdown and floating P&L
Parameters
| Parameter | Description |
|---|---|
| PresetRisk | Low / Medium / High / Manual — selects the full parameter set for the detected symbol |
| SL_Percent | Manual mode: stop loss % from entry (0 = off) |
| ManualRiskPercent | Manual mode: risk % of balance per trade |
| ManualMAPeriod | Manual mode: MA period override (0 = use symbol auto value) |
| ManualEntryDevPct | Manual mode: entry deviation % override (0 = use symbol auto value) |
| DirectionMode | Long only / Short only / Both |
| EnableSecondEntry | Enable scale-in position |
| SecondEntryMultiplier | Scale-in at EntryDev × this value |
| EnableBreakeven | Move SL to entry after trigger % |
| EnableTrailing | Trailing stop by % distance |
| MaxDailyDrawdownAmount | Daily loss limit in account currency |
| MaxTotalDrawdownAmount | Total loss from peak equity limit |
Setup
- Attach the EA to any chart of a supported symbol
- Select PresetRisk (Low / Medium / High)
- That's it — symbol is detected automatically, magic number is assigned automatically, parameters are loaded automatically
To run on multiple symbols simultaneously, attach one instance per chart. Each instance will use its own unique magic number with no overlap.
Requirements
MetaTrader 5 — any broker. Tested on IC Trading and QDM. Minimum recommended balance $500 per instance.
