How to backtest a forex EA
Backtesting replays an automated strategy against historical market data. It is useful for understanding behavior under the chosen assumptions, but it is not a promise of future performance.
Record the test conditions
Document the EA version, symbol, timeframe, date range, starting balance, leverage, spread/commission assumptions, data quality and every risk setting. Without conditions, a result is difficult to interpret or reproduce.
Read more than net profit
Review maximum drawdown, profit factor, trade count, average win/loss, losing streaks and how results change when assumptions change. Extremely optimized results can be fragile.
Then test out of sample
MetaTrader 5 explicitly supports splitting testing into backtest and forward periods. That separation can help reveal whether parameters that looked strong in one historical sample remain robust outside it.