Camovia Tray™

Blog · Roundups

How to Backtest a Strategy in MT5 Step by Step

Camovia Tray Team · 2026-09-16

So you've built or purchased a trading strategy, and you're ready to see if it actually works. But how do you know if it will perform in real market conditions without risking real money? The answer lies in backtesting—and MetaTrader 5 (MT5) has one of the most comprehensive built-in backtesting tools available. Here's your step-by-step guide to getting it right.

What Is the MT5 Strategy Tester?

The Strategy Tester is MT5's native backtesting engine . It allows you to run your Expert Advisor (EA) against historical price data, simulating trades as if they were happening in real time. The platform offers multiple testing modes, visual representation of results, and optimization capabilities to fine-tune your strategy's parameters .

Step-by-Step Guide to Backtesting in MT5

Step 1: Launch the Strategy Tester

Open MT5 on your desktop (note: the Strategy Tester is only available in the desktop version, not mobile or web) . Navigate to the "View" menu at the top and select "Strategy Tester," or simply press Ctrl + R on your keyboard .

Step 2: Select Your Expert Advisor

In the Strategy Tester window, use the "Expert" dropdown menu to select the EA you want to test . This is the automated trading strategy that will be evaluated against historical data.

Step 3: Choose Your Trading Instrument and Timeframe

Select the symbol you want to test (e.g., EURUSD, Gold, or any other asset) and the timeframe that aligns with your strategy's logic .

Step 4: Set the Testing Period

Choose the date range for your backtest. You can select predefined periods like "Last month" or "Last year," or set a custom date range . Make sure your testing period includes different market conditions—trending, ranging, and volatile periods—for a more robust evaluation.

Step 5: Select the Modeling Mode

This is where you balance speed versus accuracy:

  • Every tick (based on real ticks): The most accurate mode, using real tick data from your broker. Slowest but closest to real trading conditions .
  • Every tick (generated): Generates ticks from bar data. Faster but less precise than real ticks .
  • 1 Minute OHLC: Uses only open, high, low, and close prices for each minute. Faster, suitable for strategies that don't rely on intra-minute price movements .
  • Open prices only: Fastest but lowest fidelity. Good for quick estimates or parameter optimization across thousands of combinations .

For your initial test, "Every tick" mode is the gold standard if time allows .

Step 6: Configure EA Input Parameters

If your EA allows adjustable settings (like stop-loss distance, take-profit levels, or indicator periods), set them in the "Inputs" tab. This customization simulates different trading conditions for your strategy .

Step 7: Run the Test

Click the "Start" button at the bottom of the Strategy Tester window . The platform will begin downloading historical data (if not cached) and run the simulation. A progress bar shows completion status .

Step 8: Analyze Your Results

Once the test finishes, review the "Results" tab for key performance metrics:

  • Total trades, gross profit, gross loss
  • Profit factor, expected payoff
  • Maximum drawdown
  • Recovery factor and Sharpe ratio

The "Graph" tab displays balance and equity curves over the testing period, giving you a visual sense of how the strategy performed over time .

Step 9: Run Forward Testing

To avoid "over-optimization" (tweaking parameters to fit historical data perfectly), use the forward testing option. This reserves a portion of your testing period to validate the strategy on unseen data . The "Forward" field in the Settings tab lets you specify what percentage of the period to reserve for forward testing .

Step 10: Optimize (If Needed)

If you want to find the best parameter combination for your EA, enable the "Optimization" feature. This runs multiple backtests with different parameter combinations and identifies the settings that produced the best results on your chosen metric . However, be cautious—optimization without forward testing can lead to over-fitting.

The Reality of Backtesting: It's a Desktop-Only Process

One practical limitation worth noting: backtesting on MT5 is a desktop-only activity . You need to keep MT5 open and actively monitor the testing process. This can be frustrating if you're running multiple tests or optimizing parameters across different timeframes—tasks that require long periods of your computer's resources.

Where Camovia Tray Fits In

Here's where a tool like Camovia Tray becomes genuinely useful. Once you've finished your backtesting session and you're ready to let your EA run live, you might not want to keep MT5's main window open on your desktop all day—especially if you're monitoring multiple terminals or want to keep your screen clean.

Camovia Tray turns your MT5 into a discreet system tray tool. After launching your EA or setting up your trading terminal, you can hide the MT5 main window completely—it disappears from your taskbar and Alt+Tab switching list. Need to check your open positions or see if your EA is performing as expected? Just hover over the tray icon to see real-time quotes or open the floating order panel to view your open trades and their current P&L. When you spot a position that needs closing, you can do it with a few clicks directly from the tray—no need to restore the entire MT5 window.

This is particularly useful during those long optimization runs or live trading sessions where you want to periodically monitor your EA's performance without being tethered to a full-screen trading terminal. Your data stays local—quotes and position information are read directly from your MT5 terminal and never leave your computer.

Final Thought

Backtesting is an essential step before committing real capital to any trading strategy. MT5's Strategy Tester is powerful, but it keeps you tied to the desktop. Tools like Camovia Tray can make the post-backtesting phase—when you're actually running your strategy live—more convenient and less intrusive, letting you focus on analysis rather than window management.

MT4/MT5 Tray Assistant

Silent tracking, one-click close - check quotes and manage positions right from the tray.

Download Camovia Tray

Frequently Asked Questions

How do I report issues or contact you?

Send an email to [email protected].

Where are the privacy policy and user agreement?

The "Privacy" and "EULA" links in the footer of this site, with GDPR/CCPA information included.

What is Camovia Tray?

A tray assistant for MT4/MT5 - silent tracking, one-click close: hover the system tray to check the latest quotes and manage open positions (click an order to close it), hide the MT5/MT4 main window in one click, and keep quote and position data entirely on your computer.

Do I need MT5/MT4 installed? Does the terminal need to stay open?

Yes. Camovia Tray reads quote and position data from your locally running MT5/MT4 terminal, so the terminal must be installed, running, and logged in. MT5 connects directly with no EA; MT4 needs the bundled bridge EA attached once (one-click copy in Settings, then double-click in the Navigator - see the docs).

Popular Symbols Trading Hours

Open/close times, weekend hours & live market status: