
Why Most MT5 EAs Fail in Live Trading (And the Fixes That Actually Work)

trading mentor!
On March 14, 2023, EUR/USD dropped 180 pips in 4 hours after the SVB collapse headlines hit. I watched three separate EAs on my terminal go completely off the rails, one averaged down into the move, one reversed too early, and one just... froze. All three had passed 2-year backtests with Sharpe ratios above 1.8. That day cost me real money, and it forced me to rethink everything I thought I knew about automated trading. The truth is, most MT5 EAs don't fail because of bad logic. They fail because of how they were built, tested, and deployed.

On March 14, 2023, EUR/USD dropped 180 pips in 4 hours after the SVB collapse headlines hit. I watched three separate EAs on my terminal go completely off the rails, one averaged down into the move, one reversed too early, and one just... froze. All three had passed 2-year backtests with Sharpe ratios above 1.8. That day cost me real money, and it forced me to rethink everything I thought I knew about automated trading. The truth is, most MT5 EAs don't fail because of bad logic. They fail because of how they were built, tested, and deployed.
Key Takeaways
- Every week I see someone post a backtest on a trading forum with a smooth equity curve and declare their EA is ready to ...
- Here's a statement I'll commit to without hedging: the majority of retail EAs are overfit. Not slightly. Massively. Ove...
- Code logic gets all the attention. Execution gets none. That's backwards. Here are the four most common execution-level...
1The Backtesting Illusion: Why Your 90% Quality Test Means Nothing
Every week I see someone post a backtest on a trading forum with a smooth equity curve and declare their EA is ready to go live. The problem isn't the result. The problem is what the result is actually measuring.
MT5's Strategy Tester, even at 'Every Tick Based on Real Ticks' mode, cannot replicate live spread behavior. Spreads on EUR/USD during the SVB panic I mentioned hit 8-12 pips on some brokers, when the EA was built and tested assuming a fixed 1.2 pip spread. That single variable turned a 60-pip target trade into a losing position before price even moved.
There's a specific setting in the Strategy Tester most people ignore: the 'Use date' checkbox combined with the modeling quality percentage. If you're testing on 99% modeling quality but with fixed spreads, you're testing a fantasy instrument. Real markets have variable spreads, requotes (less common on ECN but still present), and latency spikes that your local backtest never sees.
I've run the same EA on the same 3-year data set with these two configurations:
- Fixed spread: 1.5 pips, no slippage model
- Variable spread using broker tick data + 1-3 pip random slippage
The fixed spread version showed 34% annual return. The variable spread version? 11%. Same EA. Same period. The difference is what you'll actually experience when the trade goes live. Always, always use the 'Random delays' execution model in Strategy Tester. It's buried in the settings but it's the closest thing to realism the platform offers. You can find it under Execution in the tester properties, set it to 50-200ms to simulate real order latency.
This is also where your position size calculator becomes critical during testing: if you're not factoring real spread into your risk-per-trade calculation, your position sizes will be wrong from the start.
2Overfitting: The Real Reason EAs Die 3 Weeks After Going Live
Here's a statement I'll commit to without hedging: the majority of retail EAs are overfit. Not slightly. Massively.
Overfitting happens when you optimize an EA's parameters so precisely against historical data that the EA has memorized the past instead of learning from it. The MT5 genetic optimization engine is incredibly powerful, and incredibly dangerous in the wrong hands. I've seen traders run 50,000 pass optimizations on a 12-month data set, pick the parameter set with the highest profit factor, and call it a day. That's not strategy development. That's curve fitting with extra steps.
A real test for overfitting is the walk-forward test. You split your data: optimize on the first 70%, then run a blind forward test on the remaining 30%. If your profit factor drops from 2.4 to 0.8 on the out-of-sample period, the EA is overfit. Full stop. Don't trade it.
The math matters here. Your optimization population should be meaningfully smaller than your data set's degrees of freedom. A rough rule I use: if you have more than one optimizable parameter per 1,000 bars of data, you're already in dangerous territory. An EA with 8 free parameters tested on 2,000 bars of 1H data is not a strategy. It's a memorized pattern.
I made this mistake myself in 2019 with a mean-reversion EA on GBP/USD. Optimized beautifully on 2016-2018 data. Parameter set included 11 variables. Went live in January 2019 and hit a 22% drawdown in 6 weeks before I killed it. The lesson stuck. Now I treat any forward test degradation above 40% as a hard no-go. If the EA made $10,000 on the optimization sample but only $5,000 on a comparably-sized forward sample, that's borderline acceptable. If it made $10,000 and lost $3,000 forward, that's trash.
For a deeper look at how spread and execution quality vary by instrument, the EUR/USD guide is worth reading before you commit to any major pair as your EA's primary market.
“Code logic gets all the attention.”
34 Execution Failures Nobody Talks About
Code logic gets all the attention. Execution gets none. That's backwards.
Here are the four most common execution-level failures I've diagnosed in client EAs:
-
Order modification race conditions: The EA tries to modify a stop loss on the same tick that the price triggers it. In MQL5, if you're calling
OrderModify()without first checkingOrderSelect()return values, you'll get silent failures, the order doesn't modify, no error is thrown to your log, and your risk is now uncontrolled. -
Not accounting for broker decimal places: Some brokers quote EUR/USD to 5 decimal places, some to 4. If your stop loss calculation uses a fixed pip value without checking
_Digits, your SL will be placed 10x too close or too far. I've seen this wipe accounts. -
Ignoring
IsTradeAllowed(): This function returns false during news events on some brokers, during market close, and when the account has pending margin issues. If your EA doesn't check this before every order attempt, you'll have entries that silently fail while the EA thinks it's in a trade. -
Tick-based entry logic on slow connections: EAs that trigger on each new tick work fine on a VPS with 5ms latency. On a home internet connection with 80-150ms latency, the tick that triggered your entry logic may be 3-4 ticks old by the time your order reaches the broker. You're buying into a price that no longer exists.
The fix for point 4 is to shift entry logic from OnTick() to OnTradeTransaction() where possible, or to add a maximum acceptable slippage parameter and reject fills outside that range. It's not glamorous code. But it's the difference between a live EA and a liability.
For placing orders cleanly without dealing with form dialogs that introduce their own latency, I use Pulsar Terminal's Drag Trader when I'm semi-manually managing EA positions, you drag directly on the chart and SL/TP update in real-time, which is genuinely faster than any dialog box when you're in a live position.
4The Broker Problem (Most Traders Completely Ignore This)
Your EA doesn't trade the market. It trades your broker's feed of the market. That distinction matters enormously.
I've run the exact same EA, same VPS, same settings on three different brokers simultaneously for a 6-week test period in Q3 2022. The results were not close:
- Broker A (ECN, avg spread EUR/USD 0.8 pips): +4.2% net
- Broker B (STP, avg spread 1.8 pips): +1.1% net
- Broker C (market maker, fixed 2.0 pips): -2.3% net
Same EA. Same market. Completely different outcomes, purely because of execution model and spread costs.
Scalping EAs are the most sensitive to this. An EA targeting 10 pips with a 5-pip stop is operating on a 2:1 R:R ratio. Add 2 pips of spread and that becomes a 10-pip target with a 7-pip effective risk, which is closer to 1.4:1. The math erodes the edge entirely. This is why scalping EAs that print money in backtests fail so consistently live, the backtest used a spread assumption that no real broker charges during volatile sessions.
Before deploying any EA live, run it for a minimum of 3 weeks on a demo account with the actual broker you plan to use. Not a different broker's demo. Not a prop firm sim with different execution. Your specific broker, your specific account type. Check the execution logs in MT5's Journal tab after every trade. If you're seeing consistent slippage of 1+ pips on fills, your EA's edge is probably already gone.
Broker selection reviews like the IC Markets review can give you a baseline for what ECN execution actually looks like in practice.
“Let me describe what I look for before I'd consider any EA ready for real money.”
5What a Deployable EA Actually Looks Like
Let me describe what I look for before I'd consider any EA ready for real money. This isn't a checklist you print and forget. It's a standard that most EAs don't reach.
First, the backtest must use variable spreads, random execution delays, and out-of-sample walk-forward validation. The forward test degradation should be under 40% on comparable data lengths. If you backtested 3 years, walk-forward test 1 year. Not 3 months.
Second, the EA needs a hard drawdown circuit breaker in the code. Something like this in MQL5:
double maxDrawdown = 0.10; // 10% max
double startBalance = AccountInfoDouble(ACCOUNT_BALANCE);
if((startBalance - AccountInfoDouble(ACCOUNT_EQUITY)) / startBalance >= maxDrawdown) {
// Close all positions and disable EA
ExpertRemove();
}
This is basic. I'm consistently shocked how many production EAs don't have it.
Third, the ATR indicator should be part of the EA's position sizing, not just its entry logic. Fixed lot sizing in a volatility-varying market is a recipe for inconsistent risk. ATR(14) on the H1 chart gives you a real-time measure of how much the market is moving. Your stop loss and position size should scale with it.
Fourth, the EA must be tested across multiple market regimes, not just one. An EA optimized on the 2020-2021 trending market will get destroyed in the 2022-2023 ranging, high-volatility regime. Use at least one trending year and one choppy year in your data set.
Fifth, I want to see a Monte Carlo simulation run on the backtest results. MT5 doesn't do this natively, but tools like StrategyQuant or even a basic Excel simulation using your trade-by-trade results can randomize the order of your wins and losses to show you the realistic worst-case drawdown. If your simulated worst-case is 35% but you're only comfortable with 15%, the EA is wrong for your account regardless of how good the average looks.
Most EAs fail not because the idea behind them was wrong. They fail because the validation process was lazy, the execution code was untested under real conditions, and the broker environment was assumed rather than measured. Fix those three things and your live results will look much closer to what your backtests promised.
Disclaimer: This article is for educational purposes only and does not constitute investment advice. Trading forex and CFDs carries significant risk of loss. Past performance is not indicative of future results. Always do your own research and consider your financial situation before trading. Never risk money you cannot afford to lose.
Frequently Asked Questions
Q1How much data should I use to backtest an MT5 EA before considering it valid?
At minimum, 3 years of tick data covering different market conditions, at least one strong trending period and one choppy/ranging period. For EAs with more than 5 optimizable parameters, I'd push that to 5 years. The key number isn't years though, it's the ratio of parameter count to bars tested. More than one free parameter per 1,000 bars is already a red flag for overfitting. For scalping EAs on M5 charts, 3 years might give you enough bars, but you need to verify that your tick data quality from your broker's history is actually complete, gaps in tick data will make your results look cleaner than reality.
Q2Why does my EA perform well on demo but fail on live with the same broker?
This is more common than people admit. Demo accounts at most brokers use a slightly different execution model than live accounts, specifically, demo fills are often cleaner and faster with tighter spreads during low-liquidity periods. Some brokers also route demo and live orders through different infrastructure. The way to test this is to run both accounts simultaneously for 2-4 weeks and compare fill prices trade by trade. If your live fills are consistently 0.5-1 pip worse than demo, that's execution model difference and it's real. It will compound against you over hundreds of trades. Also check whether your live account is STP vs your demo being ECN, this happens more than brokers like to advertise.
Q3Can an EA that failed on one currency pair work on another?
Sometimes yes, but you have to re-validate it completely on the new instrument, don't assume the parameters transfer. Different pairs have different volatility profiles, spread behavior, and session-based liquidity patterns. An EA built around EUR/USD's behavior during the London session may be completely wrong for GBP/JPY which has its own volatility spikes during the Asian/London overlap. You'd need to re-optimize (carefully, without overfitting) on the new pair's data, run a fresh walk-forward test, and ideally demo it for 4-6 weeks on the actual broker. The underlying logic might port over. The specific parameter values almost certainly won't.
Q4What's the minimum forward test period before putting an EA on a live account?
I use 100 completed trades as my minimum, not a time period. Time periods are misleading because a slow market might give you 40 trades in 3 months while a fast market gives you 200. You need a statistically meaningful sample of your EA's actual decision-making. If your EA averages 5 trades per week, that's 20 weeks of demo trading before you consider going live, roughly 5 months. I know that feels like a long time. But it's shorter than recovering from a blown account. The other thing I check is whether the forward test results fall within the Monte Carlo confidence interval from the backtest. If forward test drawdown exceeds the 95th percentile of your Monte Carlo simulation, something has changed in the market and the EA needs re-evaluation before going live.
Weekly Trading Insights
Free weekly analysis & strategies. No spam.
Risk Disclaimer
Trading financial instruments carries significant risk and may not be suitable for all investors. Past performance does not guarantee future results. This content is for educational purposes only and should not be considered investment advice. Always conduct your own research before trading.
Get Pulsar Terminal
All these calculators are built into Pulsar Terminal with real-time data from your MT5 account. One-click position sizing, automatic risk management, and instant calculations.
Get Pulsar TerminalStay ahead of the markets
Get weekly market analysis, trading strategies, and MT5 tips delivered to your inbox. No spam, unsubscribe anytime.

About the Author
Daniel Harrington
Senior Trading Analyst
Daniel Harrington is part of the Pulsar Terminal team, where he leads the blog and editorial content. With over 12 years of experience in forex and derivatives markets, he covers MT5 platform optimization, algorithmic trading strategies, and practical insights for retail traders.
How useful was this article?
Click a star to rate
Comments
You Might Also Like

Candlestick chart imagery sourced from pngtree.com.