Discussing the article: "Does Your EA Depend on Candle Boundaries? A Shifted-Bar Stress Test in MQL5"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Does Your EA Depend on Candle Boundaries? A Shifted-Bar Stress Test in MQL5.
The framework evaluates boundary sensitivity by rebuilding shifted target-timeframe bars from completed M1 sources and running one Strategy Tester pass for each boundary offset. It includes a ShiftedBarBuilder, a demonstration EA, and a deterministic self-test. An XAUUSD M15 case study reports net profit, Profit Factor, maximum relative equity drawdown, and total trades across all 15 offsets to quantify dependence on the bar grid.
A profitable backtest can depend on the bar-opening grid. This test rebuilds shifted bars from a common M1 history and measures the resulting changes in indicators, signals, entries, and exits. Initialization and end-of-test clipping can also change the observations supplied to the strategy.
A boundary-sensitivity test enumerates every integer-minute boundary offset for a fixed target timeframe. The M15 case study compares boundary offsets 0 through 14 minutes. Sub-minute shifts are outside this M1-based method. For each boundary offset, the EA rebuilds shifted bars from completed M1 source bars and executes one otherwise identical Strategy Tester pass. The purpose is not to find the most profitable boundary offset, but to observe how strongly the result depends on the bar-opening grid. The boundary-sensitivity test complements other robustness diagnostics. A previous article tests whether an entry filter's apparent edge survives dependent-data placebo models and block-size sensitivity. This test measures how an EA's backtest changes with the bar-opening grid.
The reader receives ShiftedBarBuilder.mqh, BoundarySensitivityEA.mq5, ShiftedBarBuilderSelfTest.mq5, and SourceGapAudit.mq5. They provide the shifted-bar implementation, an auditable 15-pass M15 boundary-sensitivity profile, and a complete 15-pass modeling-mode comparison. Separate control series assess warm-up and end-of-test clipping. SourceGapAudit exports individual gaps and a weekly session snapshot.
Author: Roberto Danilo Riccio