# 🖥️ MT4 Strategy Tester Guide

## Overview[​](#overview "Direct link to 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.

info

**Location**: View → Strategy Tester (or press `Ctrl+R`)

***

## Strategy Tester Interface[​](#strategy-tester-interface "Direct link to Strategy Tester Interface")

### Main Window Components[​](#main-window-components "Direct link to 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[​](#settings-tab "Direct link to Settings Tab")

### Expert Advisor Selection[​](#expert-advisor-selection "Direct link to Expert Advisor Selection")

**Field**: Expert Advisor dropdown<br />**Action**: Select `BananaEA-vX.XX.X-Production.ex4` or development version<br />**Note**: Only compiled (.ex4) files appear in the list

warning

**Compilation Required**: You must compile your .mq4 file to .ex4 before it appears in Strategy Tester. Use MetaEditor → F7 (Compile).

***

### Symbol Configuration[​](#symbol-configuration "Direct link to Symbol Configuration")

**Field**: Symbol dropdown<br />**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)[​](#period-timeframe "Direct link to Period (Timeframe)")

**Field**: Period dropdown<br />**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

tip

**Multi-Timeframe Feature**: BananaEA can run on any chart timeframe but execute trades on a different strategy timeframe (configurable via `StrategyTimeframe` parameter).

***

### Modeling Quality[​](#modeling-quality "Direct link to Modeling Quality")

**Field**: Model dropdown

#### Every Tick (Recommended)[​](#every-tick-recommended "Direct link to 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)[​](#every-tick-based-on-real-ticks-best "Direct link to 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)[​](#open-prices-only-fast "Direct link to 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[​](#control-points "Direct link to Control Points")

* **Quality**: \~25% accuracy
* **Speed**: Fast
* **Use For**: Preliminary tests only
* **Limitation**: Highly inaccurate for intrabar execution

danger

**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[​](#spread-configuration "Direct link to Spread Configuration")

**Field**: Spread dropdown or input<br />**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**:

1. Check your broker's typical spread for the symbol
2. For DAX (GER40): Usually 10-20 points (1-2 pips)
3. 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

warning

**Realistic Spreads**: Using spread=0 or spread=1 gives unrealistic results. Always use your broker's actual spread or higher.

***

### Date Range[​](#date-range "Direct link to Date Range")

**Fields**: From (start date) and To (end date)

**Recommendations**:

**Minimum Test Period**: 6 months<br />**Standard Test Period**: 1-2 years<br />**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[​](#visual-mode "Direct link to Visual Mode")

**Checkbox**: Visual mode<br />**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**:

```
[&lt;&lt; Previous] [Pause] [Play] [Next &gt;&gt;]  ← Control buttons

Speed Slider: [______|_________]        ← Playback speed
```

***

### Optimization Mode[​](#optimization-mode "Direct link to Optimization Mode")

**Checkbox**: Optimization<br />**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](/banana-ea/mt4/docs/v4/backtesting-optimization/running-optimizations.md) for complete guide

***

## Inputs Tab[​](#inputs-tab "Direct link to Inputs Tab")

### Configuring EA Parameters[​](#configuring-ea-parameters "Direct link to 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**:

1. **Start with Defaults**: Use EA's default parameters first
2. **Use Presets**: Load `.set` files from `MQL4/Presets/` folder
3. **Document Changes**: Keep notes on parameter modifications
4. **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[​](#results-tab "Direct link to Results Tab")

### Understanding Backtest Results[​](#understanding-backtest-results "Direct link to Understanding Backtest Results")

**Tabs Within Results**:

1. **Results** - Trade-by-trade list
2. **Graph** - Equity curve and balance visualization
3. **Report** - Detailed statistics and metrics

### Results List[​](#results-list "Direct link to 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[​](#graph-tab "Direct link to 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[​](#report-tab "Direct link to Report Tab")

Comprehensive statistics summary:

#### Key Metrics Explained[​](#key-metrics-explained "Direct link to 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[​](#backtest-execution "Direct link to Backtest Execution")

### Starting a Backtest[​](#starting-a-backtest "Direct link to Starting a Backtest")

**Step-by-Step**:

1. Configure all settings (EA, symbol, period, model, spread, dates)
2. Set input parameters or load preset
3. Click **\[Start]** button
4. Monitor progress bar at bottom of Strategy Tester
5. 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[​](#opening-backtest-chart "Direct link to 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[​](#troubleshooting "Direct link to Troubleshooting")

### Common Issues[​](#common-issues "Direct link to Common Issues")

#### "No History Data"[​](#no-history-data "Direct link to \"No History Data\"")

**Problem**: MT4 doesn't have historical data for selected symbol/timeframe<br />**Solution**:

1. Open chart for that symbol/timeframe
2. Scroll back to load more history
3. Tools → History Center → Download data

#### "Testing Failed"[​](#testing-failed "Direct link to \"Testing Failed\"")

**Problem**: EA compilation error or missing resources<br />**Solution**:

1. Check Experts tab for error messages
2. Recompile EA (F7 in MetaEditor)
3. Verify all dependencies (.mqh files, indicators) exist

#### "Tester Agent Stopped Unexpectedly"[​](#tester-agent-stopped-unexpectedly "Direct link to \"Tester Agent Stopped Unexpectedly\"")

**Problem**: EA crashed during test<br />**Solution**:

1. Check for infinite loops in code
2. Reduce test period or use faster model
3. Update MT4 to latest version

#### Backtest Runs Forever[​](#backtest-runs-forever "Direct link to Backtest Runs Forever")

**Problem**: Stuck in infinite loop or waiting for data<br />**Solution**:

1. Click **\[Stop]**
2. Check date range is reasonable
3. Verify sufficient historical data exists

***

## Tips for Efficient Backtesting[​](#tips-for-efficient-backtesting "Direct link to Tips for Efficient Backtesting")

### Speed Optimization[​](#speed-optimization "Direct link to Speed Optimization")

1. **Use Appropriate Models**:

   

   * Quick screening: Open Prices Only
   * Final validation: Every Tick

2. **Limit Date Range**:

   

   * Start with 6 months for initial tests
   * Expand to 2+ years for validation

3. **Disable Visual Elements**:

   

   * Turn off Visual Mode for faster execution
   * Disable chart indicators during testing

4. **Close Unnecessary Charts**:

   

   * Reduces MT4 memory usage
   * Speeds up testing

***

## Next Steps[​](#next-steps "Direct link to Next Steps")

Now that you understand the Strategy Tester interface:

1. **Set Up Your First Backtest** → [Backtesting Setup](/banana-ea/mt4/docs/v4/backtesting-optimization/backtesting-setup.md)
2. **Run Complete Backtests** → [Running Backtests](/banana-ea/mt4/docs/v4/backtesting-optimization/running-backtests.md)
3. **Learn Optimization** → [Running Optimizations](/banana-ea/mt4/docs/v4/backtesting-optimization/running-optimizations.md)

tip

**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[​](#related-resources "Direct link to Related Resources")

* [Introduction to Backtesting](/banana-ea/mt4/docs/v4/backtesting-optimization/introduction.md) - Fundamentals and concepts
* [Analyzing Results](/banana-ea/mt4/docs/v4/backtesting-optimization/analyzing-results.md) - Understanding your test results
* [Best Practices & Tips](/banana-ea/mt4/docs/v4/backtesting-optimization/best-practices.md) - structured workflow
