βΆοΈRunning Backtests
Executing Your First Backtest
Now that you've set up everything properly, it's time to run your backtest and see how BananaEA would have performed historically. This guide walks you through the execution process step-by-step.
Goal: Execute a complete backtest and generate reliable performance data for analysis.
Quick Start: Running a Basic Backtest
5-Step Process
Open Strategy Tester β Press
Ctrl+RConfigure Settings β EA, symbol, period, model, spread, dates
Set Parameters β Load preset or use defaults
Click Start β Begin backtest execution
Review Results β Analyze performance metrics
Detailed Backtest Execution
Step 1: Final Configuration Check
Before clicking [Start], verify these settings one last time:
Strategy Tester Settings Tab:
Inputs Tab:
Parameters loaded correctly β
Preset applied (if using) β
Magic number unique β
Step 2: Start the Backtest
Click [Start] Button
What happens next:
Step 3: Monitor Progress
Progress Bar (Bottom of Strategy Tester):
Information Displayed:
Current Date: Date/time being tested
Progress Percentage: How much completed
Bars Processed: Number of bars analyzed
Ticks Simulated: Tick count (if "Every Tick" mode)
Estimated Time:
Quick Test (6 months, Open Prices): 30 seconds - 2 minutes
Standard Test (2 years, Every Tick): 5 - 15 minutes
Comprehensive Test (5 years, Every Tick): 20 - 45 minutes
Duration varies by: Computer speed, data quality, EA complexity, timeframe, and modeling quality.
Step 4: During Backtest Execution
What You Can Do:
β Monitor Journal Tab - Check for errors or warnings β Watch Progress - Observe completion percentage β Minimize MT4 - Let it run in background β Work on Other Tasks - No need to watch continuously
What You Should NOT Do:
β Don't Close MT4 - Backtest will abort β Don't Change Settings - Wait for completion β Don't Open Heavy Programs - May slow testing β Don't Disconnect Internet - If using live data feed
Step 5: Backtest Completion
Completion Message:
Results Available:
Results Tab: Trade-by-trade list
Graph Tab: Equity curve visualization
Report Tab: Comprehensive statistics
Visual Mode Backtesting
When to Use Visual Mode
Recommended For:
β Verifying signal detection accuracy
β Debugging entry/exit logic
β Checking SL/TP placement
β Understanding EA behavior
β Confirming indicator display
β Educational purposes (learning how EA trades)
NOT Recommended For:
β Full 2-year backtests (too slow)
β Optimization runs (disabled automatically)
β Final performance validation
Enabling Visual Mode
Step-by-Step:
Strategy Tester β Settings tab
Check "Visual mode" checkbox
Configure other settings normally
Click [Start]
What Appears:
Visual Mode Controls
Playback Controls:
[Play] Button: Resume/continue backtest at current speed &#xNAN;[Pause] Button: Stop execution temporarily &#xNAN;[<< Prev]: Step backward one bar (review previous) &#xNAN;[Next >>]: Step forward one bar (advance manually)
Speed Slider:
Slowest: See every tick, perfect for debugging
Medium: Balanced view, catch signals and trades
Fastest: Quick visual confirmation, less detail
What to Look For in Visual Mode
Signal Verification:
Does EA detect signals when YOU see pattern?
Are trade arrows appearing at correct times?
Is entry logic working as expected?
Entry/Exit Accuracy:
Buy/Sell orders placed at correct prices?
Stop Loss levels appropriate?
Take Profit targets reasonable?
Indicator Behavior:
Indicators plotting correctly?
Signal arrows appearing on chart?
Multi-timeframe data syncing?
Trade Management:
Break-even adjustments triggering correctly?
Partial closes executing as expected?
Trailing stop following price appropriately?
Performance Note: Visual mode is 10-50x slower than normal backtesting. Use for verification only, not full tests.
Handling Backtest Interruptions
Stopping a Backtest Mid-Execution
How to Stop: Click [Stop] button in Strategy Tester
What Happens:
Backtest aborts immediately
Partial results may be available
No report generated (incomplete data)
Must restart from beginning
When to Stop:
π Errors flooding Journal tab
π Realized wrong settings configured
π Need to change parameters
π Testing taking unexpectedly long
Common Errors During Execution
Error: "No History Data"
Cause: Insufficient historical data for test period
Solution:
Tools β History Center (F2)
Download data for symbol/timeframe
Restart backtest
Error: "Testing Failed"
Cause: EA compilation error or resource missing
Solution:
Check Experts tab for error details
Open MetaEditor β Compile EA (F7)
Fix compilation errors
Verify all includes (.mqh files) exist
Restart backtest
Error: "Array Out of Range"
Cause: EA trying to access unavailable bars
Solution:
Check EA code for array access
Verify sufficient bars available (e.g.,
Bars > 50)Add data validation in EA code
Use longer test period with more data
Warning: "Not Enough Money"
Cause: Initial deposit too small for EA's lot calculation
Solution:
Increase initial deposit in Strategy Tester
Reduce risk percentage in EA parameters
Use smaller FixedLotSize if applicable
Check LotMethod setting
Warning: "Invalid Stops"
Cause: Stop Loss/Take Profit too close to entry price
Solution:
Check symbol's minimum stop level (MODE_STOPLEVEL)
Increase SL/TP distances in EA parameters
Verify broker's stop level requirements
Use larger pip buffers
Post-Backtest Actions
Immediately After Completion
Step 1: Quick Visual Check
Step 2: Review Key Metrics
Step 3: Save Results
Organizing Backtest Results
Recommended File Naming Convention:
Folder Structure:
Comparing Multiple Backtests
Testing Different Parameters
Scenario: Compare Conservative vs. Aggressive presets
Process:
Test 1: Load Conservative preset β Run backtest β Save report
Test 2: Load Aggressive preset β Run backtest β Save report
Compare: Open both HTML reports side-by-side
Key Comparisons:
Profit: Which made more?
Drawdown: Which risked less?
Win Rate: Which had higher success rate?
Profit Factor: Which was more efficient?
Recovery: Which recovered from losses faster?
Testing Different Timeframes
Scenario: Compare H1 vs. M15 performance
Process:
Test 1: Period=H1 β Run backtest β Save report
Test 2: Period=M15 β Run backtest β Save report
Compare: Analyze trade frequency and risk
Expected Differences:
M15: More trades, faster signals, higher frequency
H1: Fewer trades, more selective, larger moves
Testing Different Symbols
Scenario: Test DAX vs. NASDAQ vs. DOW
Process:
Test 1: Symbol=GER40.r β Run backtest
Test 2: Symbol=NAS100.r β Run backtest
Test 3: Symbol=US30.r β Run backtest
Compare: Which symbol suits EA best?
Note: Different symbols have different volatility, spreads, and trading hours. Results will vary significantly.
Backtest Validation Checklist
After completing any backtest, verify:
Data Quality
Configuration Accuracy
Results Sanity Check
Documentation
Common Backtesting Scenarios
Scenario 1: Quick Parameter Screening
Goal: Quickly test if parameter change improves results
Setup:
Period: 6 months (recent data)
Model: Open Prices Only (speed)
Visual mode: OFF
Process:
Run baseline test with defaults
Change one parameter
Run test again
Compare results
If promising, validate with "Every Tick" on longer period
Time: 2-5 minutes per test
Scenario 2: Comprehensive Validation
Goal: Thoroughly validate EA before live trading
Setup:
Period: 3-5 years (extensive history)
Model: Every Tick (accuracy)
Visual mode: OFF (too slow for long period)
Process:
Run full backtest on primary symbol (e.g., DAX)
Save detailed report
Analyze all metrics carefully
Validate with forward testing
Only then proceed to live testing
Time: 20-45 minutes
Scenario 3: Visual Verification
Goal: Verify EA logic and signal detection
Setup:
Period: 1-3 months (short, manageable)
Model: Every Tick
Visual mode: ON
Process:
Watch first few days carefully
Verify signals trigger correctly
Check SL/TP placement
Observe trade management
Confirm expectations match behavior
Time: 30-60 minutes (with pauses for observation)
Tips for Efficient Backtesting
Time-Saving Strategies
Use Progressive Testing:
Batch Testing:
Run multiple backtests overnight
Queue tests with different parameters
Review all results in morning
Template Settings:
Save Strategy Tester configurations
Load templates for consistent testing
Avoid reconfiguring each time
Common Time Wasters to Avoid
β Visual Mode on Long Tests - Use only for short verification β "Every Tick" on Initial Screening - Use faster models first β Testing Same Thing Repeatedly - Document what you tested β Not Saving Results - Always save before running next test β Watching Progress Bar - Let it run, do other work
Next Steps
Now that you know how to run backtests:
Analyze Your Results β Analyzing Results
Learn Optimization β Optimization Fundamentals
Run Optimizations β Running Optimizations
Validate Results β Validation & Forward Testing
Pro Tip: Keep a testing journal. Document every backtest with date, parameters, results, and observations. This becomes invaluable for tracking what works and what doesn't!
Related Resources
MT4 Strategy Tester Guide - Interface details
Backtesting Setup - Configuration guide
Best Practices & Tips - Professional workflow
Introduction to Backtesting - Fundamentals
Last updated