# GBPUSD London Bollinger — code-based baseline

Edge Quant, 23 November 2026. Source: Stefan's public QuantConnect forum algorithm, published 4 January 2017 and updated 6 January 2020: https://www.quantconnect.com/forum/discussion/1597/london-breakout-strategy/ . This package tests ONE combined long/short baseline with fixed source parameters and a separate long buy-and-hold comparator. No alternative clock or optimized parameter case is added.

This is a hypothetical EUR-denominated CFD account study on Dukascopy-derived quotes. It is not an exact legacy LEAN/FXCM fill-model replication, an MT5 Strategy Tester report, or a live record.

## Reproduce

Use Python 3.11+ in an isolated virtual environment. From this package directory:

```sh
python -m pip install -r requirements.txt
python download_data.py --symbols GBPUSD EURUSD --period M5 --start-year 2015 --end-year 2025
python verify_data.py
python backtest.py --data-dir data --out results
python -m unittest discover -s . -p 'test_backtest.py'
```

The 2015 quotes provide indicator warmup; reported account performance covers 1 January 2016 through 31 December 2025 inclusive. Only ten completed observed hourly closes are required by the indicator, but the complete prior calendar year is retained for reproducibility. Price manifests, raw annual source hashes, data audits and computed signal inputs accompany the package. Full M5 prices and raw caches are fetched by the downloader rather than duplicated in this ZIP. Compare SHA-256 values before treating a rerun as identical.

Attribution: Dukascopy ticks aggregated by EV Trading Labs, https://evtradelabs.com/data . This is an explicitly identified distributor feed, not a direct bank export or an FTMO broker price series. The direct historical bank export route required AWS Requester Pays credentials unavailable here. GBPUSD was downloaded from the same distributor; the independently verified EURUSD conversion cache was reused. No different underlying price source or synthetic prices were silently substituted. Data rights remain with the respective providers.

## Rules fixed before the run

For each nonempty observed UTC hour [t−1h,t), use its final observed M5 BID close, available at t. Compute Bollinger bands from the last ten completed hourly bid closes INCLUDING the current close: simple mean ±2.2 times POPULATION standard deviation (normalizer N, not N−1). Empty hours emit no price or signal. Warmup is required.

The source code reads a bar's start timestamp, not its delivery time. Our code-clock interpretation uses FIXED EST, UTC−5 throughout the year. QuantConnect staff distinguish FXCM data timestamps from the algorithm's New York log clock: https://www.quantconnect.com/forum/discussion/5365/daylight-savings-timezone-confusion/p1 . Population standard deviation is documented by QuantConnect: https://www.quantconnect.com/docs/v2/writing-algorithms/indicators/supported-indicators/standard-deviation .

Eligible bar START hours are 05:00 through 10:00 fixed EST inclusive: UTC starts 10:00–15:00, with decisions at 11:00–16:00 UTC. The consumed-trade flag resets only on an observed bar whose start hour is 01:00 fixed EST (UTC start06:00, decision07:00). A missing reset bar does not create an artificial reset. The algorithm's London name and high-level discussion do not override these explicit code-clock rules. This is not the common 08:00 London Asian-range breakout, and no UK or US daylight-saving shift is applied to the fixed EST strategy clock.

The source checks ENTRY before EXIT. If flat, the daily/reset-cycle trade allowance is unused, and the bar-start hour is eligible: buy when the signal bid close is strictly above the upper band, or short when strictly below the lower band. Record that signal bid close as a fixed reference. A qualifying order attempt consumes the cycle's allowance, including an attempt that cannot be filled; failures are reported. At most one position is held.

On every observed hourly event with a position, including its entry event, check the fixed thresholds: long profit if signal bid >reference+0.00080, long loss if signal bid <reference−0.00180; short profit if bid <reference−0.00080, short loss if bid >reference+0.00180. Equality does not exit. Both implementations use a floating-point comparison tolerance of 1e-12 times the greater of one and the compared price magnitudes, far below a quote tick. Then increment the held-event counter, including the entry event as 1, and exit when the counter exceeds 5. Thus a timed exit occurs on the sixth observed held event, five elapsed hours after entry when hours are contiguous. TP takes precedence over SL and time if multiple reasons coincide. The reference does not trail.

These are sampled hourly market-exit rules, not intrabar stop orders or guaranteed 8/18-pip fills. Orders execute at the first available M5 opening quote at or after the signal. Entry delay is capped at 15 minutes; late entries are skipped and consume the qualifying attempt's allowance. An exit remains pending through missing quotes and is filled at the next available quote, with delay disclosed. There is no same-event re-entry, since entries are checked before exits and the allowance is consumed. Open positions at the last available 2025 close are liquidated with normal modeled costs and flagged as window-end exits.

## EUR account and costs

Each account starts at EUR10,000. One standard lot represents 100,000 GBP. Entry size stays within 1x current EUR equity in entry USD notional converted through EURUSD, rounds down to the 0.01 lot step/minimum, and reserves entry commission. The budget includes the adverse entry-slippage price. Long fills buy GBPUSD ask+0.00001 and sell bid−0.00001; short fills sell bid−0.00001 and buy ask+0.00001. That adverse price amount is 0.1 pip per side. Actual historical bid/ask quotes supply spread. Commission is USD3.50 per lot per side.

USD profits convert to EUR at EURUSD ask. USD losses, fees and financing liabilities convert at bid. Conversion alignment uses exact contemporaneous quotes or already observed prior closes; entry conversion quotes older than 15 minutes block the attempt. Missing exit or valuation conversion quotes are carried backward only and flagged, rather than deleting a trade. The account holds EUR cash plus converted floating GBPUSD CFD P&L; USD or GBP principal is not modeled as a physical cash purchase.

Financing is a declared ASSUMPTION: a 5% annual debit on absolute entry USD notional, across elapsed calendar time/365, for both trade directions. It is not reconstructed historical swap/carry or a statement of FTMO broker fees. Real carry can be a credit, rates and rollover days vary, and execution gaps can extend holding time. Cash earns zero interest. These fixed assumptions were not adjusted after seeing results. The intraday strategy and long-duration comparator have different exposure times and financing totals, which are reported.

Buy-and-hold is a fixed-quantity long GBPUSD CFD from the first available 2016 quote through the final 2025 quote, with comparable initial notional, rounding and the same cost framework. It is not the return on holding GBP cash, EUR deposits or an unfinanced spot investment.

## Evidence and limitations

Profit Factor uses closed-trade net P&L after all modeled fees and funding. A one-trade benchmark's PF/win rate cannot establish trading consistency. Sharpe uses calendar daily EUR equity returns, zero risk-free rate and sqrt(365) annualization. Headline drawdown and Recovery Factor use daily equity; sampled M5-close drawdown is also reported. Recovery Factor is net EUR profit divided by maximum absolute EUR drawdown. CAGR covers the full evaluation period.

The 2016–2020 and 2021–2025 diagnostic slices were fixed before the run, with no fitting or parameter tuning. The source was published during the first slice. Although the later slice is after publication, this 2026 strategy-selection exercise is retrospective, not pristine prospective out-of-sample validation. Original source prose, legacy feed conventions and market-order fill behavior are not treated as verified reproductions: our bid-bar interpretation, timing and next-quote execution are fully stated here.

Current FTMO objectives were checked 23 November 2026: https://ftmo.com/en/trading-objectives/ . The screens assess a single continuous EUR10,000 modeled account and sampled equity, with approximate Prague-midnight reset balances. They do not simulate every sequential evaluation phase, reset, starting date, tick path or actual historical broker swap. A sampled static-floor breach rejects this continuous trajectory under the model; no sampled breach does not certify a pass. Current 1-Step Consistency for orders from 12 October 2026 uses the best closed-profit day divided by total NET closed profit, including losses. Funded Standard holding/news restrictions still require separate verification.

## MQL5 status

`LondonBollinger.mq5` is original complete MQL5 source using the standard MetaTrader Trade include. Read `MQL5_NOTES.md` for signal construction, reset state, position ownership, broker sizing and UTC/server offsets. Source was reviewed but not compiled or run in MT5 here. Actual broker fills, commission and swap differ from model assumptions; the EA does not artificially debit 5% financing. Publishing source is not an instruction to trade live.

Original code: MIT license. Third-party market data and cited publications retain their source rights.
