✅ Quick Checklist (TL;DR) #
Your Simple Workflow (Print This) #
2. Prepare: Clean data, add realistic costs, set periods
3. Set Periods: IS = 2019-2024, OOS = 2025-2026 (example)
4. Optimize: Test settings on IS period, use custom metrics
5. Validate: Check top settings on OOS (2025 forward test)
6. Compare: IS vs OOS equity curves – do they look similar?
7. Select: Keep 2-10 stable settings per symbol, discard the rest
8. Final Test: Run “Every Tick” to today, visually prune to 0-3 per symbol
9. Portfolio: Combine selected settings, check overall risk
10. Go Live: Start small, monitor, review quarterly
🎯 Core Rules #
Keep These Principles in Mind:
- Simple is better: Fewer settings = more reliable results. Aim for 3 or fewer optimized parameters.
- More trades = more confidence: Try for 200+ trades minimum, 500+ is better.
- Test different markets: Your strategy should work in up, down, and flat markets.
- Include real costs: Always add spreads, commissions, and slippage to your tests.
- Never test and validate on the same data: Keep a separate period for final checks.
- Stable settings win: Good parameters work across different pairs and timeframes.
🔬 Backtesting Basics #
Data & Trade Count Guide #
| What to Check | Minimum | Better | Best |
|---|---|---|---|
| Number of Trades | 100 | 200+ | 500+ |
| Time Period | 1 year | 3-5 years | 10+ years |
| Market Types | 1 type | 2 types | 3 types (up/down/sideways) |
| Data Quality | OHLC | OHLC + Volume | Tick data with spread modeling |
Simple Tips:
- Use tick or M1 data for strategies under H1 timeframe
- Remove big news events if your strategy doesn't trade news
- Test on multiple pairs to see if your strategy is truly robust
- Always include realistic trading costs
⚙️ Optimization Tips #
The 3-Setting Rule #
Never optimize more than 3 settings at once. Too many settings leads to:
- Fitting to past noise instead of real patterns
- Poor performance when you go live
- Settings that keep changing and never stabilize
Simple Optimization Steps:
2. Test wide ranges first, then narrow down
3. Always check results on your validation period
4. Pick settings that work well across different pairs
5. Choose “good and stable” over “perfect on paper”
📈 Advanced Optimization Techniques #
| Technique | Purpose | Implementation |
|---|---|---|
| Walk-Forward Analysis | Validate parameter stability over time | Rolling optimization windows |
| Monte Carlo Simulation | Test strategy resilience to randomness | Shuffle trade sequences 1,000+ times |
| Parameter Sensitivity Analysis | Identify robust vs. fragile parameters | Heatmaps of performance vs. parameter values |
| Multi-Symbol Optimization | Find universal parameters | Optimize same params across 3-5 correlated pairs |
| Regime-Based Optimization | Adapt to market conditions | Separate optimization for trending/ranging markets |
🔄 Walk-Forward Analysis Framework #
Enhanced Step-by-Step Process #
↓
Optimize on In-Sample → Validate on Out-of-Sample
↓
Record OOS Performance → Roll Window Forward by OOS Period
↓
Repeat → Aggregate All OOS Results → Final Robustness Assessment
Implementation Example: #
- Total Data: 2012-2024 (12 years)
- Stage 1: Optimize 2012-2017 (5y IS) → Validate 2017-2018 (1.25y OOS)
- Stage 2: Optimize 2012.25-2017.25 → Validate 2018-2019.25
- Repeat until final OOS period ends at present
- Final Decision: Use parameters from last optimization ONLY if aggregated OOS results meet criteria:
- Profit Factor > 1.3
- Max Drawdown < 1.5x backtested DD
- Sharpe Ratio > 0.8
- Parameter values stable across stages
🔄 Single-Stage with Validation Process #
What Is This Process? #
This is a simple, practical method to find robust trading settings without over-complicating things. Instead of multiple walk-forward stages, we use one long optimization period followed by a dedicated validation period before going live.
Why Use This Approach? #
- ✅ Simpler to set up and manage
- ✅ Longer optimization period = more reliable results
- ✅ Clear separation between testing and validation
- ✅ Easy to spot over-optimized settings
- ✅ Works well with MT5's built-in forward testing
The Timeline Example (8-Year Total) #
Today: January 1, 2026
📅 Total Period: Jan 1, 2019 → Dec 31, 2026 (8 years)
┌─────────────────────────┬─────────────────────────┐
│ IN-SAMPLE (Optimize) │ OUT-OF-SAMPLE (Validate + Live) │
│ Jan 1, 2019 │ Jan 1, 2025 │
│ ↓ │ ↓ │
│ Dec 31, 2024 │ Dec 31, 2026 │
│ (6 years) │ (2 years) │
│ │ │
│ │ ├─ Forward Test: 2025 │
│ │ └─ Live Trading: 2026 │
└─────────────────────────┴─────────────────────────┘
What We Optimize #
In this single stage, we optimize these key components:
- Market context filters (when to trade based on market conditions)
- Strategy filters (entry/exit rules and conditions)
- Take Profit / Stop Loss ratios (R:R settings)
- Stop Loss methods (fixed, ATR-based, volatility-adjusted)
- Trailing Stop Loss settings (when and how to trail)
- Weekend / trading day rules (close trades before weekends or hold)
This focused approach lets us test meaningful combinations without exploding the number of tests.
Step-by-Step Workflow #
Step 1: Set Your Periods in MT5
- Total backtest period: 2019-2026
- In-Sample (Optimization): 2019-2024
- Forward/OOS (Validation): 2025-2026
- Enable “Forward Testing” in MT5 Strategy Tester
Step 2: Run Optimization on In-Sample Period
- Test your parameter combinations on 2019-2024 data
- Use your custom metrics:
CAGR / Blended DDorCAGR / Avg DD - Save the top 20-50 performing settings (not just #1)
Step 3: Validate on Forward Period (2025)
- Check how those top settings performed in 2025 (unseen data)
- Look for:
- Similar equity curve shape (IS vs OOS)
- Reasonable drawdown (not 2-3x worse than IS)
- Consistent trade frequency and win rate
- No single huge wins masking poor consistency
Step 4: Select Settings That Pass Validation
- Keep settings that are “good and stable”, not necessarily the absolute best
- Discard any setting where OOS looks materially different from IS
- Typical outcome: 2-10 settings per symbol pass this filter
- If nothing passes → discard the symbol entirely, move on
Step 5: Final Manual Check (“Every Tick” to Today)
- Run each passing setting with “Every Tick” data quality up to today
- Visually inspect equity curves for smoothness and consistency
- Prune down to 0-3 final settings per symbol for your portfolio
Step 6: Portfolio Building
- Combine your selected settings across symbols
- Check overall portfolio correlation and risk
- Start live trading with small size, monitor closely
Simple Selection Criteria #
✅ Keep a setting if:
- CAGR/Blended DD ratio is strong in optimization AND reasonable in validation
- Equity curve looks similar in shape between IS and OOS (smooth, consistent growth)
- Drawdown in OOS is within 1.5x of IS drawdown
- Trade count in OOS is meaningful (not just 5-10 lucky trades)
- Performance doesn't rely on one or two outlier trades
❌ Discard a setting if:
- OOS equity curve looks completely different from IS (e.g., smooth IS → choppy OOS)
- Drawdown blows up in validation period
- Profit comes from 1-2 huge trades, rest are losses
- Settings only work on one specific pair or timeframe
- You feel like you're “cherry-picking” the result
Visual Example: Good vs Bad Validation #
IS (2019-2024): /‾‾‾‾/‾‾‾‾/‾‾‾‾‾/‾‾‾‾‾‾ (smooth upward curve)
OOS (2025): /‾‾‾/‾‾‾‾/‾‾‾/ (similar shape, slightly less steep)❌ BAD: Over-Optimized
IS (2019-2024): /‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ (perfect straight line up)
OOS (2025): ‾‾‾\___/‾‾\_____/‾‾ (choppy, sideways, or down)
🛡️ Validation Checklist #
Before Going Live: Quick Checks #
✅ Performance Check
- ☐ OOS results are within 20-30% of IS results (not identical, but close)
- ☐ Drawdown in validation is acceptable for your risk tolerance
- ☐ Strategy makes money in at least 2 different market conditions
✅ Equity Curve Check
- ☐ IS and OOS curves look similar in shape and smoothness
- ☐ No huge gaps or spikes that suggest data issues or overfitting
- ☐ Growth is steady, not dependent on one lucky period
✅ Trade Quality Check
- ☐ Minimum 50 trades in validation period (more is better)
- ☐ Win rate and profit factor are reasonable, not extreme
- ☐ Average trade duration matches your strategy design
✅ Final Prep
- ☐ Run “Every Tick” test to today for final settings
- ☐ Visually review each equity curve one last time
- ☐ Document your final settings and why you chose them
⚠️ Common Mistakes #
Simple List of What to Avoid #
| Mistake | Why It's Bad | Simple Fix |
|---|---|---|
| Too many settings | Fits past noise, fails later | Max 3 optimized parameters |
| Only testing one market | Strategy might only work in bull markets | Test up, down, and sideways markets |
| Ignoring trading costs | Looks profitable on paper, loses money live | Always add spread + commission + slippage |
| Picking the #1 result | Often the most overfitted | Choose “good and stable” over “perfect” |
| No validation period | No way to know if it will work live | Always keep unseen data for final check |
| Cherry-picking results | Misleads you about real performance | Show the full picture, not just the best part |
Red Flags to Watch For:
- Profit Factor above 3.0 in backtest (probably too good to be true)
- Fewer than 50 trades in your validation period
- Best settings are at the very edge of your tested range
- One or two trades make up most of the profit
📚 Resources #
Helpful Tools & Learning #
🎥 Video Series
- Darwinex: Backtesting & Optimization
https://www.youtube.com/watch?v=WBZ_Vv-iMv4&list=PLv-cA-4O3y95J6xmwSaCILL4FlGJZO0PJ -
Clear explanations of complex topics. Great for visual learners.
📖 Simple Reads
- Quantitative Trading by Ernest Chan – Practical and readable
- The Evaluation and Optimization of Trading Strategies by Robert Pardo – Focus on walk-forward and validation
🛠️ Tools
| Tool | Best For | Why Use It |
|---|---|---|
| AlgoNation Portfolio Builder | MT5 report analysis & portfolio construction | Analyze backtest reports, build diversified portfolios, and validate strategy combinations with advanced metrics https://algonation.io/portfolio-builder |
| MT5 Strategy Tester | Forex/CFD strategies | Built-in forward testing, easy to set up |
| TradingView + Pine Script | Quick idea testing | Fast prototyping, cloud-based |
| Python (Backtrader) | Custom research | Full control, great for advanced users |
No Comment