# EURUSD Monday CCI — directional component study

Edge Quant, 22 November 2026. This study adapts Daniel Chen's public QuantConnect example, published 2 August 2019: https://www.quantconnect.com/forum/discussion/6245/forex-monday-cci-trend-strategy/ . The two independent cases are long-only and short-only components. The combined long/short original is not an additional tested case.

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

## Reproduce

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

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

The downloader caches annual public responses in `data/raw/`. Full M5 files and raw caches are obtained through that script rather than duplicated in the ZIP. Price manifests and the QA report record original endpoints and SHA-256 hashes. Check them against the frozen report before treating a rerun as identical. The 2015 observations warm up the indicator; reported account performance is only 2016–2025.

Data attribution: Dukascopy ticks aggregated into bid/ask OHLC 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 bank export route required AWS Requester Pays credentials unavailable in this environment. Existing 2016–2025 cache files were verified and only the missing 2015 warmup was downloaded. Prices were not silently replaced with another source or invented through data gaps. Source rights remain with the respective data providers.

## Rules and execution conventions

Compute daily BID OHLC by UTC date, retaining Monday through Friday dates that have actual observations and excluding Sunday partial bars from the indicator. Typical price is (high + low + close)/3. CCI(30) uses a simple mean and the mean absolute deviation of the same 30 typical prices from that mean: (last typical price − mean)/(0.015 × mean absolute deviation). No signal exists until 30 completed weekday bars are available. Missing weekdays do not receive fabricated prices.

At each observed completed UTC hourly bar, use its last actual bid close, observed by the hour boundary. The indicator uses only completed weekday daily bars. Monday normally uses Friday's CCI throughout the day; when Friday has no data it uses the latest prior completed weekday.

Case A: if flat on a UTC Monday and CCI is strictly above +100, enter long. Case B: independently, if flat on a UTC Monday and CCI is strictly below −100, enter short. Hold at most one position per case. These are level conditions, not fresh-crossing conditions. No parameter optimization is performed.

On every completed hourly bar, first check an existing position. Signed bid-price return from its stored ENTRY SIGNAL bid close must be strictly greater than +1% for a profit exit, or strictly below −5% for a loss exit. The reference remains fixed and does not trail. Long return is (current bid close − reference)/reference; short return reverses the numerator. These are sampled hourly market-exit rules, not broker stop orders and not guaranteed maximum losses.

Execution uses the first available M5 opening quote at or after the decision time. An entry more than 15 minutes late is skipped. A triggered exit remains outstanding until the next available quote, and delays are reported rather than removing the trade. After an exit, same-hour Monday re-entry is permitted if that case's indicator condition remains true. Positions still open at the final available 2025 close are liquidated with normal modeled costs and flagged as window-end exits. No future exit availability or returns select entries.

The original full code combines long and short entries, uses the platform's New York algorithm clock and Forex midpoint QuoteBar close, and has no explicit warmup/readiness check. Our UTC clock, weekday bid bars, excluded Sunday indicator bars, bid-based signal references, 2015 warmup and independent directional accounts are explicit implementation adaptations. They do not establish exact platform reproduction. The original explanatory prose refers to crossing/trailing behavior; the actual full code uses levels and fixed entry-relative exit thresholds. Our original implementation follows that code structure while declaring its data conventions.

## EUR account and costs

Each case starts at EUR10,000, with no cash interest. One standard lot represents 100,000 EUR base units. Entry volume rounds down to a 0.01 lot step/minimum and stays within 1x current equity in base-EUR notional, reserving the entry commission and slippage budget. No extra leverage is introduced. Broker specifications must be checked independently for the EA.

Historical bid/ask quotes supply the spread. Adverse slippage is 0.00001 USD per EUR (0.1 pip) per side. Long entry buys ask plus slippage and exit sells bid minus slippage; short entry sells bid minus slippage and exit buys ask plus slippage. Commission is USD3.50 per lot per side. USD profits convert to EUR at current ask; USD liabilities, commission and funding convert at bid. CFD principal itself is not exchanged for an unhedged cash holding.

Financing is an ASSUMPTION: a 5% annual debit on entry USD notional, across elapsed calendar time/365, for BOTH directions. It is not a historical swap or carry series, and is not an assertion about FTMO's fees. Real short positions may receive carry credits, rates change, and rollover schedules differ. These conditional cost assumptions are fixed before the run and must not be confused with actual broker net results.

The buy-and-hold comparator is a fixed-quantity long EURUSD CFD entered at the first available 2016 quote and exited at the last available 2025 close, with the same initial notional convention and costs. It is not the return on simply holding EUR cash. Exposure time, direction and turnover differ between cases and comparator and are reported.

## Reading the evidence

Trade Profit Factor includes net closed-trade P&L after fees and funding. A one-trade benchmark's PF may be undefined and its win rate is not a reliability estimate. Sharpe uses calendar daily EUR equity returns, zero risk-free rate and sqrt(365) annualization. Headline drawdown and Recovery Factor use calendar daily equity; sampled M5-close drawdown is reported separately. Recovery Factor is net profit divided by maximum absolute EUR drawdown. CAGR covers the full evaluation window.

The 2016–2020 and 2021–2025 slices are fixed descriptive stability checks with no fitting or parameter tuning. The source was published during the first slice. The later period is after the source publication, but this 2026 strategy-selection exercise is retrospective; it is not pristine prospective out-of-sample validation.

Current FTMO objectives were checked on 22 November 2026: https://ftmo.com/en/trading-objectives/ . The results screen one continuous EUR10,000 account using sampled equity and approximate Prague-midnight balances. They do not simulate all sequential phases, resets, entry dates, broker ticks or actual historical swaps. A sampled static-floor breach rejects this tested trajectory under the model; absence of sampled breaches does not certify a pass. Current 1-Step Consistency for new orders from 12 October 2026 uses best closed-profit day divided by total NET closed profit, including losing days. Actual program rules and funded-account holding/news restrictions still apply.

## MQL5 source status

`MondayCCI.mq5` is original MQL5 source for the stated adaptation. Read `MQL5_NOTES.md` for indicator construction, account specifications, UTC/server-time setup and execution differences. It was source reviewed but not compiled or tested in MT5 here. The broker controls actual fills, fees and swaps; the EA does not artificially charge research-model financing. Publishing source is not an instruction to place live trades.

Original code is MIT licensed. Data, cited publications and third-party implementations retain their source rights.
