Home > EA & MT5 Knowledge Base > How to Backtest

BacktestMT5

Cách chạy backtest bằng Strategy Tester của MT5

Updated: May 15, 2026

What is Backtesting?

Backtesting is the process of running an EA against historical market data to verify the effectiveness of a strategy. MT5 comes standard with a powerful backtest function called the Strategy Tester.

Without using real funds, you can check EA performance against years of historical data, making it an important step before running an EA on a live account.

Even if a backtest shows good results, it does not guarantee future profits. Use backtesting only as a reference.

Opening the Strategy Tester

Tab Settings của Strategy Tester trên MT5 (chọn EA, cặp tiền, khung thời gian, giai đoạn và chế độ mô phỏng)
Tab Settings của Strategy Tester trên MT5 (chọn EA, cặp tiền, khung thời gian, giai đoạn và chế độ mô phỏng)

Here's how to open the Strategy Tester in MT5.

  • Method 1:Click 'View' → 'Strategy Tester' from the top menu
  • Method 2:Use the keyboard shortcut 'Ctrl + R'
  • Method 3:Click the 'Strategy Tester' button in the toolbar

The Strategy Tester panel will appear at the bottom of the screen.

Backtest Settings

Tab Inputs của tester (kiểm tra và thay đổi giá trị đầu vào của EA)
Tab Inputs của tester (kiểm tra và thay đổi giá trị đầu vào của EA)
SettingRecommendedDescription
Expert AdvisorGOLD_VIPERSelect the EA to test
Symbol (Currency Pair)XAUUSDSelect GOLD
TimeframeM30 (30 phút)Set to match the EA design
ModelEvery TickHighest accuracy (takes longer)
PeriodCustomSet the period to test (e.g., 2020-2025)
Initial Balance10000Virtual initial capital ($10,000, etc.)
CurrencyUSDMatch your account currency
Spread30-50 (XAUUSD)Set a value close to the actual spread
'Every Tick' mode is most accurate but takes longer. We recommend first checking quickly with 'Control Points', then verifying with 'Every Tick'.

Running the Backtest

Backtest đang chạy (tải lịch sử giá và thanh tiến trình)
Backtest đang chạy (tải lịch sử giá và thanh tiến trình)
  1. 1.Once settings are complete, click the 'Start' button
  2. 2.A progress bar will appear and the backtest will begin
  3. 3.After completion, a list of all trades will appear in the 'Results' tab
  4. 4.In the 'Graph' tab, you can view a chart of asset progression
  5. 5.In the 'Report' tab, you can check detailed statistical information

Reading the Results

Kết quả ở tab Backtest (lợi nhuận ròng, profit factor, drawdown tối đa, số lệnh)
Kết quả ở tab Backtest (lợi nhuận ròng, profit factor, drawdown tối đa, số lệnh)
MetricDescriptionTarget
Net ProfitTotal profit during the backtest periodShould be positive
Win RatePercentage of profitable trades out of all tradesTùy chiến lược (EA xu hướng 35–45% vẫn ổn)
Profit Factor (PF)Total profit ÷ Total loss1,3 trở lên làm mốc (1,1–2,0 là lành mạnh)
Maximum Drawdown (DD)Maximum decline in assetsDưới 20% làm mốc (DD tương đối 10–25% là phổ biến)
Sharpe RatioReturn-to-risk ratio1.0+ desirable
Total TradesNumber of trades during the backtest periodToo few = low reliability
Max Consecutive LossesMaximum number of consecutive lossesCheck if you can tolerate this psychologically

Bình luận & câu hỏi