π₯οΈ MT4 Strategy Tester Guide
Overviewβ
The MetaTrader 4 Strategy Tester is MT4's built-in tool for backtesting and optimizing Expert Advisors. This comprehensive guide will walk you through every feature and help you master the Strategy Tester for testing BananaEA.
Location: View β Strategy Tester (or press Ctrl+R)
Strategy Tester Interfaceβ
Main Window Componentsβ
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β Strategy Tester β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β [Settings] [Inputs] [Optimization] [Results] β β Tabs
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Expert Advisor: [BananaEA v3.13.x βΌ] β
β Symbol: [GER40.r βΌ] β
β Period: [H1 βΌ] β
β Model: [Every tick βΌ] β
β Spread: [10 points βΌ] β
β Date Range: [2024.01.01] to [2025.10.20] β
β Visual Mode: [β‘] Optimization: [β‘] β
β β
β [Start] [Stop] [Open Chart] β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Settings Tabβ
Expert Advisor Selectionβ
Field: Expert Advisor dropdown
Action: Select BananaEA-vX.XX.X-Production.ex4 or development version
Note: Only compiled (.ex4) files appear in the list
Compilation Required: You must compile your .mq4 file to .ex4 before it appears in Strategy Tester. Use MetaEditor β F7 (Compile).
Symbol Configurationβ
Field: Symbol dropdown
Options:
- GER40.r (DAX - recommended for BananaEA)
- US30.r (Dow Jones)
- NAS100.r (NASDAQ)
- Any other symbol your broker offers
Recommendation: Test on the symbol you intend to trade live. BananaEA is optimized for DAX (GER40.r) on H1 timeframe.
Period (Timeframe)β
Field: Period dropdown
Options: M1, M5, M15, M30, H1, H4, D1, W1, MN
BananaEA Defaults:
- Primary: H1 (1-hour) - Most tested and reliable
- Alternative: M5 (5-minute) - Faster signals, more trades
- Alternative: M15 (15-minute) - Balanced approach
Multi-Timeframe Feature: BananaEA can run on any chart timeframe but execute trades on a different strategy timeframe (configurable via StrategyTimeframe parameter).
Modeling Qualityβ
Field: Model dropdown
Every Tick (Recommended)β
- Quality: 90% accuracy
- Speed: Slower (minutes to hours)
- Use For: Final validation, detailed analysis
- Requirement: Tick data downloaded
Every Tick Based on Real Ticks (Best)β
- Quality: 99% accuracy
- Speed: Slowest
- Use For: structured-grade validation
- Requirement: Real tick data from broker
Open Prices Only (Fast)β
- Quality: ~10% accuracy
- Speed: Fastest (seconds to minutes)
- Use For: Quick parameter screening, optimization
- Limitation: Not suitable for final validation
Control Pointsβ
- Quality: ~25% accuracy
- Speed: Fast
- Use For: Preliminary tests only
- Limitation: Highly inaccurate for intrabar execution
Critical: NEVER trust final results from "Open Prices Only" or "Control Points" modes. These are screening tools only. Always validate with "Every Tick" mode.
Spread Configurationβ
Field: Spread dropdown or input
Options:
- Current (uses live spread at test start)
- Fixed spread in points (e.g., 10 points = 1 pip for 5-digit brokers)
How to Set:
- Check your broker's typical spread for the symbol
- For DAX (GER40): Usually 10-20 points (1-2 pips)
- Add buffer for peak times: Use average spread + 50%
Example:
- Average DAX spread: 1.5 pips (15 points)
- Set to: 20 points (2.0 pips) for conservative testing
Realistic Spreads: Using spread=0 or spread=1 gives unrealistic results. Always use your broker's actual spread or higher.
Date Rangeβ
Fields: From (start date) and To (end date)
Recommendations:
Minimum Test Period: 6 months
Standard Test Period: 1-2 years
Comprehensive Test: 3-5 years
Best Practice:
Test Period Selection:
ββ Include Different Market Conditions
β ββ Trending markets
β ββ Ranging markets
β ββ High volatility periods
β ββ Low volatility periods
β
ββ Include Different Seasons
β ββ Q1: January-March
β ββ Q2: April-June
β ββ Q3: July-September (low volume)
β ββ Q4: October-December
β
ββ Avoid Cherry-Picking
ββ Don't test only "good" periods
Visual Modeβ
Checkbox: Visual mode
Purpose: Watch the backtest execute trade-by-trade on a chart
When to Use:
- β Verifying signal detection
- β Checking SL/TP placement
- β Debugging EA behavior
- β Understanding entry/exit logic
- β Confirming visual indicators work
When NOT to Use:
- β Full backtest runs (too slow)
- β Optimization (disabled automatically)
- β Final performance testing
Controls During Visual Mode:
[<< Previous] [Pause] [Play] [Next >>] β Control buttons
Speed Slider: [______|_________] β Playback speed
Optimization Modeβ
Checkbox: Optimization
Purpose: Test multiple parameter combinations systematically
When Enabled:
- Inputs tab shows parameter ranges (Start, Step, Stop)
- Optimization tab becomes active
- Visual mode is disabled
- MT4 tests all parameter combinations
Details: See Running Optimizations for complete guide
Inputs Tabβ
Configuring EA Parametersβ
Purpose: Set input parameters for the EA before backtesting
Access: Click "Inputs" tab in Strategy Tester
Interface:
ββββββββββββββββββββββββββββββββββββββββββ
β Parameter Name β Value β βΌ β
ββββββββββββββββββββββββββββββββββββββββββ€
β Magic β 12345 β
β RiskPercent β 2.0 β
β UseSLtoBE β true β
β BreakEvenMethod β 2 β
β ... β ... β
ββββββββββββββββββββββββββββββββββββββββββ
Best Practices:
- Start with Defaults: Use EA's default parameters first
- Use Presets: Load
.setfiles fromMQL4/Presets/folder - Document Changes: Keep notes on parameter modifications
- Test One Change: Modify one parameter at a time to understand impact
Loading Preset Files:
Right-click in inputs area β Load
β Navigate to MQL4/Presets/
β Select preset file (e.g., BananaEA-DAX-H1-Conservative.set)
β Click Open
Results Tabβ
Understanding Backtest Resultsβ
Tabs Within Results:
- Results - Trade-by-trade list
- Graph - Equity curve and balance visualization
- Report - Detailed statistics and metrics
Results Listβ
Shows every trade executed during backtest:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Time βType βOrder βSizeβPrice βS/L βT/P βProfitβ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 10:00:00 βbuy β1 β1.0 β19000.0β18950.0β19100.0β+100.0β
β 11:30:00 βsell β2 β1.0 β19050.0β19100.0β18950.0β+100.0β
β 14:00:00 βbuy β3 β1.0 β18980.0β18930.0β19080.0β-50.0 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Columns:
- Time: When trade was opened/closed
- Type: Buy, Sell, Close, Modify
- Order: Ticket number
- Size: Lot size
- Price: Execution price
- S/L: Stop Loss level
- T/P: Take Profit level
- Profit: Profit/loss for that trade
Right-Click Options:
- Save as Report (HTML)
- Save as Detailed Report (HTML with graphs)
- Copy trade data
Graph Tabβ
Visual representation of trading performance:
Equity Curve (Green/Red Line):
- Shows account balance + floating P&L over time
- Green = growing equity
- Red = drawdown periods
- Smooth curve = consistent performance
- Jagged curve = high volatility
Balance Line (Grey Line):
- Shows closed trade balance only
- Steps up/down with each trade close
- No floating P&L included
Key Visual Indicators:
- β Upward Trend: Strategy is profitable
- β οΈ Flat Periods: Consolidation or no trades
- π Sharp Drops: Significant drawdowns
- β Recovery: Ability to bounce back from losses
Report Tabβ
Comprehensive statistics summary:
Key Metrics Explainedβ
Profit & Loss:
- Total Net Profit: Final profit after all trades
- Gross Profit: Sum of all winning trades
- Gross Loss: Sum of all losing trades
- Profit Factor: Gross Profit divided by Gross Loss. Review it together with drawdown, trade count, and the equity curve.
Trade Statistics:
- Total Trades: Number of completed trades
- Win Rate: (Winning Trades Γ· Total Trades) Γ 100%
- Loss Rate: (Losing Trades Γ· Total Trades) Γ 100%
- Average Trade: Total Profit Γ· Total Trades
Drawdown:
- Maximal Drawdown: Largest peak-to-trough decline
- Absolute Drawdown: Largest drop from starting balance
- Relative Drawdown: Max DD as % of peak balance
Trade Duration:
- Average Win: Average duration of winning trades
- Average Loss: Average duration of losing trades
- Longest Trade: Maximum time in a single position
Consecutive Results:
- Maximum Consecutive Wins: Longest winning streak
- Maximum Consecutive Losses: Longest losing streak (risk assessment)
Save Report:
Right-click in Report tab
β Save as Report (basic HTML)
β OR Save as Detailed Report (includes graphs and trade list)
Backtest Executionβ
Starting a Backtestβ
Step-by-Step:
- Configure all settings (EA, symbol, period, model, spread, dates)
- Set input parameters or load preset
- Click [Start] button
- Monitor progress bar at bottom of Strategy Tester
- Wait for completion message: "Tester: stop testing"
Progress Indicators:
Testing: 2024.03.15 14:00 [ββββββββββββ] 67%
Bars: 8,234 | Ticks: 1,234,567 | Trades: 45
During Test:
- Progress bar shows current date and completion %
- Can click [Stop] to abort test
- Visual mode shows live chart if enabled
- Journal tab shows EA log messages
Opening Backtest Chartβ
After Completion: Click [Open Chart] button to see:
- Tested price history
- Trade arrows (entry/exit points)
- Indicator overlays
- Visual representation of strategy execution
Chart Features:
- π’ Green arrows = Buy entries
- π΄ Red arrows = Sell entries
- π Indicators visible (if enabled)
- πΉ Trade lines showing SL/TP levels
Troubleshootingβ
Common Issuesβ
"No History Data"β
Problem: MT4 doesn't have historical data for selected symbol/timeframe
Solution:
- Open chart for that symbol/timeframe
- Scroll back to load more history
- Tools β History Center β Download data
"Testing Failed"β
Problem: EA compilation error or missing resources
Solution:
- Check Experts tab for error messages
- Recompile EA (F7 in MetaEditor)
- Verify all dependencies (.mqh files, indicators) exist
"Tester Agent Stopped Unexpectedly"β
Problem: EA crashed during test
Solution:
- Check for infinite loops in code
- Reduce test period or use faster model
- Update MT4 to latest version
Backtest Runs Foreverβ
Problem: Stuck in infinite loop or waiting for data
Solution:
- Click [Stop]
- Check date range is reasonable
- Verify sufficient historical data exists
Tips for Efficient Backtestingβ
Speed Optimizationβ
- Use Appropriate Models:
- Quick screening: Open Prices Only
- Final validation: Every Tick
- Limit Date Range:
- Start with 6 months for initial tests
- Expand to 2+ years for validation
- Disable Visual Elements:
- Turn off Visual Mode for faster execution
- Disable chart indicators during testing
- Close Unnecessary Charts:
- Reduces MT4 memory usage
- Speeds up testing
Next Stepsβ
Now that you understand the Strategy Tester interface:
- Set Up Your First Backtest β Backtesting Setup
- Run Complete Backtests β Running Backtests
- Learn Optimization β Running Optimizations
Practice Makes Perfect: The best way to master Strategy Tester is hands-on practice. Start with a short date range and work your way up to comprehensive tests.
Related Resourcesβ
- Introduction to Backtesting - Fundamentals and concepts
- Analyzing Results - Understanding your test results
- Best Practices & Tips - structured workflow