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 TrayFrequently 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).
Online Tools
Popular Symbols Trading Hours
Open/close times, weekend hours & live market status:
Related Articles
Best Free Crypto Signals Telegram Reddit: What Actually Works in 2026
Compare free crypto signals on Telegram and Reddit, and see how Camovia Tray helps you act on signals faster by managing MT5/MT4 positions from the system tray.
Why Most EA Traders Ignore Risk Management (And How to Fix It Without Changing Your Setup)
Discover how Camovia Tray helps EA traders manage risk faster by bringing MT5/MT4 positions to your system tray for instant viewing and one-click closing—no terminal windows needed.
Easy Trend Visualizer: When Simplicity Beats Complexity in MetaTrader
Enhance your trend analysis with Easy Trend Visualizer. Simplify your trading workflow by managing MT5/MT4 from the system tray with Camovia Tray.
Best MT5 History Analyser Tool: What Traders Actually Need (and Where Most Solutions Fall Short)
Discover how Camovia Tray enhances your MT5 workflow by providing real-time position management and quote viewing from the system tray, complementing your trade history analysis for a more efficient trading experience.
MTF Indicators: Multi-Timeframe Analysis in Trading
Learn how MTF indicators improve trading decisions through multi-timeframe analysis. Camovia Tray helps streamline MT5/MT4 position management.
More Articles
What Time Does the COMEX Exchange Open? A Complete Guide to COMEX Market Hours
COMEX market hours explained: when the exchange opens, daily closing time today, and the most active trading windows. See how Camovia Tray helps you monitor quotes and manage positions from the system tray.
Crypto Trading Bot Free App: What Actually Works When You're Watching the Market Alone
Keep crypto positions private and check live quotes from your system tray with Camovia Tray, a local-data tool for MT5/MT4 traders.
Martingale vs Grid vs Hedging: Three Ways to Add Risk
Martingale, grid and hedging all average into positions, and Camovia Tray keeps the chart, your fills and open risk visible from the system tray.
How PMI Moves Forex Markets—and Why You Need to See It Without Distraction
Turn your MT5/MT4 into a tray tool with Camovia Tray and never miss a PMI move again. Check live quotes, manage open positions, and close trades with one click—right from your system tray. All data stays local, no terminal clutter, no distractions.
When Does the XAUUSD Market Open? A Complete Guide to Gold Trading Hours Across Brokers
Track XAUUSD market open times across MT5, Pepperstone, and Vantage, and see how Camovia Tray keeps live gold quotes and positions visible from your system tray.