▢️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.

circle-check

Quick Start: Running a Basic Backtest

5-Step Process

  1. Open Strategy Tester β†’ Press Ctrl+R

  2. Configure Settings β†’ EA, symbol, period, model, spread, dates

  3. Set Parameters β†’ Load preset or use defaults

  4. Click Start β†’ Begin backtest execution

  5. 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

circle-info

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:

  1. Strategy Tester β†’ Settings tab

  2. Check "Visual mode" checkbox

  3. Configure other settings normally

  4. 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?

circle-exclamation

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:

  1. Tools β†’ History Center (F2)

  2. Download data for symbol/timeframe

  3. Restart backtest


Error: "Testing Failed"

Cause: EA compilation error or resource missing

Solution:

  1. Check Experts tab for error details

  2. Open MetaEditor β†’ Compile EA (F7)

  3. Fix compilation errors

  4. Verify all includes (.mqh files) exist

  5. Restart backtest


Error: "Array Out of Range"

Cause: EA trying to access unavailable bars

Solution:

  1. Check EA code for array access

  2. Verify sufficient bars available (e.g., Bars > 50)

  3. Add data validation in EA code

  4. Use longer test period with more data


Warning: "Not Enough Money"

Cause: Initial deposit too small for EA's lot calculation

Solution:

  1. Increase initial deposit in Strategy Tester

  2. Reduce risk percentage in EA parameters

  3. Use smaller FixedLotSize if applicable

  4. Check LotMethod setting


Warning: "Invalid Stops"

Cause: Stop Loss/Take Profit too close to entry price

Solution:

  1. Check symbol's minimum stop level (MODE_STOPLEVEL)

  2. Increase SL/TP distances in EA parameters

  3. Verify broker's stop level requirements

  4. 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:

  1. Test 1: Load Conservative preset β†’ Run backtest β†’ Save report

  2. Test 2: Load Aggressive preset β†’ Run backtest β†’ Save report

  3. 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:

  1. Test 1: Period=H1 β†’ Run backtest β†’ Save report

  2. Test 2: Period=M15 β†’ Run backtest β†’ Save report

  3. 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:

  1. Test 1: Symbol=GER40.r β†’ Run backtest

  2. Test 2: Symbol=NAS100.r β†’ Run backtest

  3. Test 3: Symbol=US30.r β†’ Run backtest

  4. Compare: Which symbol suits EA best?

circle-info

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:

  1. Run baseline test with defaults

  2. Change one parameter

  3. Run test again

  4. Compare results

  5. 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:

  1. Run full backtest on primary symbol (e.g., DAX)

  2. Save detailed report

  3. Analyze all metrics carefully

  4. Validate with forward testing

  5. 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:

  1. Watch first few days carefully

  2. Verify signals trigger correctly

  3. Check SL/TP placement

  4. Observe trade management

  5. 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:

  1. Analyze Your Results β†’ Analyzing Results

  2. Learn Optimization β†’ Optimization Fundamentals

  3. Run Optimizations β†’ Running Optimizations

  4. Validate Results β†’ Validation & Forward Testing

circle-check

Last updated