ResearchPart 4 of the MT5 Indicator Backtest Series

Bollinger Bands on EUR/USD 4H: Nine Configurations, Zero Survivors

By Marcus Vector··12 min read·← Part 3: RSI Results

60-Second Summary

  • Zero survivors from 9 Bollinger Bands variants tested
  • 100% killed by IS/OOS drift — every configuration exceeded the 5pp threshold in at least one window
  • Best performer traded only 96 times in 6 years — too few trades for reliable statistical inference at any Sharpe ratio
  • Best performer: period=25, std_dev=2.5 — +0.79 Sharpe aggregate, but passed only 2 of 6 validation windows
  • Period matters more than std_dev — longer periods (25) consistently beat shorter ones (15)
  • Bollinger Bands passed more windows than MACD or SMA — 2 of 6 for its best variant, versus 1 of 6 and 0 of 6 respectively

Bollinger Bands are among the most widely used mean-reversion tools in retail forex trading. We tested 9 parameter configurations across 13 years of EUR/USD 4H data using rigorous walk-forward validation. The signal logic is sound, the bands compute correctly, and the entry and exit conditions are well-formed. None of it matters — all 9 configurations failed for the same structural reason every prior indicator in this series has failed. This article explains precisely why, using only the figures that exist in the underlying sweep data.

1. Hypothesis & Parameter Grid

Bollinger Bands consist of a middle band (a simple moving average of closing price) and an upper and lower band set a multiple of standard deviations away from it. The mean-reversion hypothesis: when price closes below the lower band, it has moved statistically far enough from its recent average that it is likely to revert back toward the middle band.

Signal type: Mean reversion, long only. Entry: close price crosses below the lower band. Exit: close crosses above the middle band, or a fixed 5-bar timeout, whichever triggers first.

ParameterValues TestedNotes
period15, 20, 25Middle band SMA length
std_dev1.5, 2.0, 2.5Band width multiplier
exit_bars5 (fixed)Held constant to isolate band sensitivity

Grid structure: full factorial, period × std_dev = 9 configurations (hypotheses HYP_0112 through HYP_0120). Direction: long only. Transaction cost: 2.0 pips round-trip.

2. Methodology

Identical methodology to Part 3 (RSI study) and every prior study in this series. This allows direct, apples-to-apples comparison between indicator families.

Data Specification

PairEUR/USD
Timeframe4-hour (H4)
PeriodJanuary 1, 2013 – April 18, 2026 (13.3 years)
Total bars22,193
Windows validated54 (9 variants × 6 windows)
Transaction costs2.0 pips round-trip (1.5 pip spread + 0.5 pip slippage)

Signal Logic

// Bollinger Bands calculation

Middle band = SMA(close, period)

Lower band = Middle − (std_dev × StdDev(close, period))

Upper band = Middle + (std_dev × StdDev(close, period))

// Entry

Close crosses below lower band → enter long next bar open

// Exit

Close crosses above middle band, OR 5-bar timeout — whichever first

Walk-Forward Windows

WindowIS PeriodOOS Period
12013–20152015
22015–20162017
32016–20182019
42018–20202021
52020–20222023
62022–20242025

5-Stage Kill Filter

Same sequential filter as every study in this series. Critically, Stage 3 is evaluated per-window, not on aggregate average drift — a configuration passing 5 of 6 windows but failing one is still killed.

Ranking metric: OOS Sharpe ratio, net of costs, computed from bar-level portfolio returns via vectorbt.

3. Results

9 variants tested. 0 survivors.

Every Bollinger Bands configuration cleared the profitability bar and the sample-size bar. Every single one then failed the IS/OOS drift check — 100% of the 9 configurations, matching the pattern across all 183 hypotheses in the full Phase 2 sweep.

Kill Filter Breakdown

StageReasonKilled% of Total
Stage 1Net expectancy ≤ 000.0%
Stage 2Effective sample < 5000.0%
Stage 3IS/OOS drift > 5pp (any window)9100.0%
Stage 4Binomial test fail00.0% (never reached)
Stage 5Sharpe variance00.0% (never reached)

All 9 Configurations — Aggregate

HypothesisPeriodstd_devAvg Sharpe OOSTotal Trades
HYP_0112151.5+0.4236388
HYP_0113152.0+0.5210248
HYP_0114152.5-0.138290
HYP_0115201.5+0.3359333
HYP_0116202.0+0.5005218
HYP_0117202.5+0.239694
HYP_0118251.5+0.7276302
HYP_0119252.0+0.5533189
HYP_0120252.5+0.794296

All 9 killed at Stage 3 (IS/OOS drift). No hypothesis reached Stage 4.

Performance Summary (All 9 Variants)

MetricMeanMedianBestWorst
OOS Sharpe+0.44+0.50+0.79-0.14
Net Expectancy+1.25 pips+0.47 pips+7.01 pips-1.95 pips
OOS Win Rate53.8%53.0%64.2%46.2%
OOS Trade Count21821838890
Mean |Drift| (per variant)9.66pp9.23pp6.42pp13.12pp

For Trade Count, higher is not automatically “better” here — the lowest-trade configuration (90 trades) is flagged in Section 4 as statistically unreliable, not just infrequent. For Mean |Drift|, lower is better; “Best” and “Worst” are reversed accordingly from the other rows.

Every variant except one was net-profitable, and it didn't matter: Mean OOS Sharpe across all 9 variants is a positive +0.44, and 8 of 9 configurations posted positive aggregate Sharpe. All 9 still failed the per-window drift check.

The best aggregate Sharpe came with the fewest trades: The top-ranked configuration (period=25, std_dev=2.5) produced only 96 OOS trades across 6 years — about 16 per year. A high Sharpe built on a small sample is a weaker result than it looks.

4. Best Performer: Period=25, std_dev=2.5 (HYP_0120)

The longest period paired with the widest bands in the grid — the most selective configuration tested, and also the highest-ranked by aggregate Sharpe.

OOS Sharpe

+0.79

Net Expectancy

+7.01 pips

OOS Win Rate

64.2%

Kill Reason

Stage 3 Drift

Per-Window Breakdown

WindowPeriodDriftResult
12015+13.6pp❌ FAIL
22017+5.7pp❌ FAIL
32019-2.0pp✅ PASS
42021-2.8pp✅ PASS
52023+35.8pp❌ FAIL
62025+12.1pp❌ FAIL

Windows passing drift check: 2 out of 6 (33.3%) — Windows 3 and 4.

Window 5's 83.3% OOS win rate is the single highest win rate in the entire 9-variant BB sweep. It is also produced by only 12 trades, and it carries the worst drift in the entire sweep at +35.8 percentage points. This is a demonstration of the regime effect covered in Section 7, not a contradiction of the overall finding.

Testing Bollinger Bands With Regime Filters

The data suggests Bollinger Bands mean reversion needs a trend or regime filter to avoid entries during directional moves — none of which was tested in this study. Building that logic into MQL5 code requires knowing the language. StratForge generates the complete EA code for combinations like Bollinger Bands + ADX through a guided strategy interview — no coding required.

Generate a Bollinger Bands + filter EA with StratForge →

5. Worst Performer: Period=15, std_dev=2.5 (HYP_0114)

The shortest period paired with the widest bands — the only configuration in the entire grid with a negative aggregate Sharpe, and the only window in the sweep to drift by more than 38 percentage points.

OOS Sharpe

-0.14

Net Expectancy

-1.95 pips

OOS Win Rate

46.2%

Kill Reason

Stage 3 Drift

Per-Window Breakdown

WindowPeriodDriftResult
12015+1.1pp✅ PASS
22017+15.2pp❌ FAIL
32019-38.1pp❌ FAIL
42021+3.5pp✅ PASS
52023+15.6pp❌ FAIL
62025+5.2pp❌ FAIL

Windows passing: 2 out of 6. Trade counts of 7–21 per window make several of these Sharpe estimates unreliable regardless of the drift result.

Best vs Worst: Side-by-Side

MetricPeriod=25/2.5 (best)Period=15/2.5 (worst)
Total OOS trades9690
OOS Sharpe+0.79-0.14
Net expectancy+7.01 pips-1.95 pips
Own mean |drift|12.0pp13.12pp
Windows passing2 / 62 / 6

Same trade count, opposite outcome: These two configurations have almost identical trade counts (96 vs 90) and pass the same number of windows (2 of 6), yet one is the best-Sharpe result in the sweep and the other is the worst. The difference is a single 5-year stretch — see Section 7.

6. Trade Frequency vs Drift

std_dev directly controls how often the signal fires: narrower bands are touched more often, wider bands more rarely. Conventional wisdom says higher-frequency signals should drift less — more trades means a more stable sample. We checked this directly against the 9-variant set.

Effect of std_dev on Trade Frequency and Drift

std_devAvg Trades/WindowMean |Drift|Window-Level Pass Rate
1.5 (narrow)56.88.14pp44.4%
2.0 (standard)36.48.49pp50.0%
2.5 (wide)15.612.35pp33.3%

Window-Level Pass Rate is the share of the 18 individual windows (3 configurations × 6 windows) in each std_dev group that stayed under the 5pp drift threshold. All 9 configurations are still 100% killed at the hypothesis level, since the kill rule triggers on any single failing window — this table shows where the failing windows concentrate.

The intuition runs backward here. The lowest-frequency group (std_dev=2.5, ~16 trades/window) has the highest mean drift and the worst window-level pass rate. The highest-frequency group (std_dev=1.5, ~57 trades/window) has the lowest mean drift. Fewer, more selective signals were not more stable in this dataset — they were less stable, on average, because each individual trade in a thin sample carries more weight when the regime shifts.

Effect of Period on Aggregate Sharpe

PeriodAvg Sharpe Across std_dev Values
15+0.269
20+0.326
25+0.692

Longer periods consistently outperform shorter periods on aggregate Sharpe, regardless of std_dev. This is consistent with slower, smoother bands filtering out noise-driven entries — but as Sections 4 and 7 show, the improvement comes with a much smaller sample and does not translate into a stable per-window result.

7. Regime Dependence

Window 5 (OOS: 2022–2023) — The Outlier

Window 5 is the dominant performance driver across the entire sweep. Every one of the 9 configurations posted its best or near-best result here, and every one of them also posted some of its worst drift here.

ConfigurationWindow 5 SharpeWindow 5 Net Exp.All-Window Avg Sharpe
15/1.5+2.05+6.55 pips+0.42
15/2.0+1.83+7.09 pips+0.52
20/2.0+3.86+18.53 pips+0.50
20/2.5+3.29+30.08 pips+0.24
25/1.5+2.92+11.19 pips+0.73
25/2.0+3.03+16.21 pips+0.55
25/2.5+2.62+22.28 pips+0.79

The 2022–2023 EUR/USD period followed sharp directional moves tied to post-COVID monetary policy normalization and ECB rate hiking. Mean-reversion signals fired at volatility extremes and profited from the subsequent corrections. This is a regime-specific effect, not a robust edge.

Windows 3 and 4 (OOS: 2018–2019, 2020–2021) — Consistent Failure

2018–2019 (EUR/USD trending lower then choppy) and 2020–2021 (COVID volatility followed by EUR strength) were systematically hostile to mean-reversion entries. Price violated the lower band, continued lower, and did not return to the middle band within 5 bars — the signal entered at the start of extended moves rather than at exhaustion points. 7 of 9 configurations posted a negative Sharpe in at least one of these two windows.

The structural picture: Bollinger Bands mean reversion works when price behaves like a rubber band, stretched below the lower band and snapping back. It fails when price behaves like a stone dropped off a cliff, briefly touching the lower band on the way to a much lower level. EUR/USD 4H spends enough time in trending regimes that the cliff metaphor applies in roughly a third of all OOS windows tested here.

Kill Filter Verdict

9 of 9 hypotheses killed at Stage 3. No hypothesis reached Stage 4 or Stage 5. The dominant kill pattern: win rate drift exceeding 5 percentage points in at least one window was universal across all 9 configurations. The signal consistently learns roughly 10 to 20 percentage points of in-sample noise that does not transfer out-of-sample. Maximum drift observed across the sweep: -38.1pp (period=15, std_dev=2.5, Window 3, 2019). This matches the zero-survivor pattern found across the full 183-hypothesis Phase 2 sweep.

8. Bollinger Bands vs MACD vs SMA

All three studies used identical testing conditions — same pair, same timeframe, same windows, same costs, same kill filter — so results are directly comparable across the series.

MetricBest SMA30/200 crossBest MACD9/21/11Best BB25/2.5
OOS Sharpe+0.86+1.24+0.79
Net Expectancy+23.56 pips+5.55 pips+7.01 pips
OOS Win Rate62.4%50.7%64.2%
Avg Trades/Window5.762.516.0
Windows Passing (this variant)0 / 61 / 62 / 6
Family Mean Drift17.35pp8.99pp9.66pp
Family Drift-Kill Rate44.0%100.0%100.0%
Survived full filter?❌ No❌ No❌ No

The verdict:Bollinger Bands' best variant passed more validation windows (2 of 6) than either MACD (1 of 6) or SMA (0 of 6), and it edges out SMA on family mean drift. But its family-wide drift-kill rate is 100%, tied with MACD and well behind SMA's 44%. None of the three families survived standalone. Each fails in a different way: SMA on consistency across its 25 variants, MACD on drift severity despite consistent profitability, and Bollinger Bands on sample size in its best-performing corner of the grid.

9. Why This Matters

For Retail Traders

If you are trading Bollinger Bands mean reversion on MT5 default settings or a course-taught configuration, here is what this data actually supports.

1. A wider band is not automatically a “safer” band

  • std_dev=2.5 (the widest, most selective setting) had the highest mean drift and the worst window-level pass rate of the three std_dev values tested
  • The best aggregate Sharpe in the entire sweep came from a std_dev=2.5 configuration with only 96 trades — a result built on a thin sample, not a more robust signal
  • Fewer signals concentrate more weight on each individual trade, which makes results more sensitive to regime, not less

2. The moving-average period mattered more than the band width

Average Sharpe rose from +0.269 at period=15 to +0.692 at period=25, a much larger swing than anything driven by std_dev. If you are tuning Bollinger Bands, this data suggests the middle-band length is the higher-leverage parameter to think carefully about — though neither parameter fixed the underlying drift problem.

For Strategy Developers

Bollinger Bands mean reversion is not worthless here, it is unfinished. Paths worth testing, none of them validated in this study:

Option 1: Regime Conditioning

Bollinger Bands alone produces a 100% drift-kill rate. Untested combinations worth exploring: Bollinger Bands + ADX to filter out trending periods, Bollinger Bands + ATR percentile to avoid volatility extremes, or a session-based entry restriction. None of these were part of this sweep.

Option 2: %B or Bandwidth Instead of a Simple Band Touch

This study tested a binary close-below-lower-band trigger with a fixed 5-bar exit. Continuous measures like %B or bandwidth percentile were not tested and may carry more information about how stretched price actually is.

Option 3: A Longer Exit Timeout Paired with a Wide Band

The best-performing configuration in this sweep (period=25, std_dev=2.5) also had the fewest trades. A longer holding window might let the mean-reversion thesis play out further, at the cost of more market exposure per trade — not tested here.

10. Frequently Asked Questions

What was the best Bollinger Bands configuration in this backtest?
Period=25, std_dev=2.5 ranked highest of 9 configurations with an aggregate OOS Sharpe of +0.79 and net expectancy around +7.01 pips. It still failed: only 2 of its 6 validation windows passed the drift check, and it produced just 96 trades across 6 years — too few for reliable inference.
Does the standard deviation (std_dev) parameter matter for Bollinger Bands?
Less than the moving-average period does. std_dev meaningfully affects trade frequency — narrower bands generate 3 to 4 times more trades than wider bands — but has a smaller effect on aggregate Sharpe ratio than the period parameter does.
Do Bollinger Bands work as a mean-reversion strategy in forex?
Not reliably as a standalone signal, based on this data. All 9 configurations failed walk-forward validation. A strong 2022–2023 result reversed in the adjacent 2018–2019 and 2020–2021 windows — the signature of a regime effect, not a durable edge.
Why did all nine Bollinger Bands configurations fail walk-forward validation?
Every configuration was killed at Stage 3, the per-window IS/OOS drift check. All 9 exceeded the 5 percentage-point threshold in at least one window, most often 2018–2019 and 2020–2021, when price broke the lower band and kept moving instead of reverting.
Is Bollinger Bands better than MACD or SMA for EUR/USD 4H?
Its best variant has a lower Sharpe (+0.79) than MACD's best (+1.24) and roughly matches SMA's best (+0.86), but it passed more validation windows (2 of 6) than either. No family survived the full filter standalone — each failed for a different structural reason.
How should Bollinger Bands be used in MT5?
Based on this data, not as a standalone mean-reversion entry signal. It likely needs a trend or regime filter to avoid entries during directional conditions — a combination not tested in this study and still a hypothesis rather than a validated recommendation.

11. Next in the Series

This is Part 4 of the MT5 Indicator Backtest Series. Every study uses the same methodology, the same dataset, and the same 5-stage kill filter, making results directly comparable across indicator families.

Put This Research to Work

The clearest finding across four studies now: single-indicator strategies need regime conditioning to be deployable, and that conditioning has not yet been tested in this series. Building a multi-indicator MQL5 EA is something most traders cannot code themselves. StratForge generates complete, reviewed EA code from a conversational strategy interview. No coding required. Your own Anthropic API key means you pay Anthropic directly — typically a few cents per generation.

Generate a Custom Bollinger Bands EA →