Skip to main content

Free MT5 EA · XAUUSD M15

Có Làm Mới Có Ăn

A MetaTrader 5 EA running on XAUUSD, M15 timeframe — open source for the community, completely free. It ships 5 strategies still under research.

  • All 5 strategies have FAILED formal statistical validation. There is no basis for trading real money.
  • Runs on XAUUSD M15 charts only. Every number on this page applies to that timeframe only.
  • The project owner is a member who came up through the Cần Cù Bù Siêng Năng trading community.
  • Open source under the MIT license: free to view, modify, use and share, as long as the copyright notice is kept. The software is provided as is, without any warranty.

Not investment advice. The results on this site are in-sample backtests — past performance does not guarantee future results. Only trade with money you can afford to lose without affecting your life. Read the full disclaimer.

Download the EAComing soon — still being tested
See the 5 strategiesGitHub· Coming soon

What the bot does, in one minute

The original strategy idea

The core idea is simple: when gold is rising, don't chase the price right after it jumps. Wait for it to pull back to the moving-average zone, and buy only when it bounces back up. The bot does exactly that, mechanically, in 4 steps.

XAUUSD · M15EMA34 / EMA89Pullback to EMABounce bar → entry
Illustration of the idea: price pulls back to the EMA zone, then bounces. Hand-drawn, not real data.
  1. 1. The bigger trend is up

    On H4 and H1, price closes above both the EMA34 and EMA89. If not, the bot stays out. It only BUYS.

  2. 2. The trend is strong enough

    ADX of 22 or more, EMA34 sloping up, and a wide enough “dragon band” (the gap between EMA34 of highs and EMA34 of lows). This filters out sideways markets.

  3. 3. Wait for a pullback

    The previous M15 candle must have dipped into the dragon band or the EMA89 — price has just pulled back.

  4. 4. Enter on the bounce

    The signal candle is green and closes above the dragon band and the EMA89. The bot buys at the open of the next M15 candle. The released version checks every hour of the trading week, with no session filter.

Exiting

The stop-loss sits below the EMA89. There is no fixed take-profit. At +2R the stop moves to break-even, then up another 1R for each further 1R of profit. A trade only closes when it hits its stop. After 2 losing trades in a day, the bot rests until the day ends.

Why not take profit early

In the backtests most losing trades are small and close quickly; the profit comes from a handful of trades that catch a long move. Taking profit early would cut exactly those trades.

A different variant: London Open 7AM

No waiting for a pullback. Each day the bot checks just one moment, 7:00 UTC when London opens. If H4 is rising and EMA34 slopes up strongly enough, it buys.

Origins

These strategies are inspired by the Break strategy by Trần Đình Hưng, Jesse, and Dino, and by the Sonic R system (Dragon EMA34 / EMA89). This is Panda's own re-coded version, researched and validated through the process described below — the results on this site do NOT represent the original authors' results.

The original authors are not involved in, did not review, and are not responsible for this EA; any mistakes are Panda's own.

Origins: trading-research-lab/.ai/evidence/champion-rerun-2026-09-17/forward-demo/BRIEF-brain-forward-demo-C-D.md §2–§4(not published)

From idea to (maybe) real money

Research process

A trading strategy isn't trustworthy just because it exists — it has to go through several rounds of testing before anyone should consider using real money. Here are the steps, and where each of the 5 strategies on this site currently stands.

How the data was sourced

The first 5 steps all use the same data sourcing and processing, described below so you can judge how much to trust it.

Real price ticks, not ready-made candles
The raw data is every XAUUSD price tick (bid/ask at each price change). M15, H1 and H4 candles are rebuilt from ticks by the same code for every source.
Two independent sources
Exness: 2016 → Aug 2026. Dukascopy: Jul 2004 → 2023. The two are time-aligned; M15 closing prices differ by a median of only $0.03–0.13 per year (2016–2023).
Dukascopy has gaps
In 2016–2023, on 675 of 2,387 days that Exness has data, Dukascopy has no candles at all. So Dukascopy numbers are only used as a cross-check, not as the main numbers.
Trading costs
Spread comes from the real ticks. Commission $7/lot. Swap (overnight fee) isn't in the research engine; it's estimated separately at about −0.04R per day held.
Same risk everywhere
Every number uses a fixed $50 risk per trade.
Step 5 runs on real MT5
MT5 Strategy Tester, Exness-MT5Trial14 server, XAUUSDm M15. Exness only has real ticks from 2026; 2020–2025 use ticks simulated from M1 candles.
Show data weaknesses
  • Exness 2016–2023 was used to design and tune the strategies (in-sample), so numbers on that period tend to look better than reality.
  • Dukascopy 2005–2015 was partly looked at while researching the older strategy family, so it isn't fully 'clean' either.
  • 2024–2026 data was only used to calibrate expectations. There is no stretch of data yet that was never looked at, for a truly independent test.

How the data was sourced: build-bars/build_bars.py(not published) · source-gap/source-gap.md · source-gap/missing-bars.md · duka-2005-2023/REPORT.md · regime-gate/REPORT.md ($7/lot) · atr-and-recent/result.md (swap) · data/backtests.json (MT5)(not published)

1. Idea

Write the entry and exit rules into a precise, computable formula — based on the ideas listed under Origins.

All 5 strategies have gone through this step.

Show results per strategy
StrategyMain entry ruleSL to break-even atMax open trades
Classic PullbackPrice pulls back to EMA34/89 then bounces, any hour+2R3
Near-Touch PullbackLike Classic Pullback, price only needs to get close to the EMA+2R3
3-Bar PullbackLike Classic Pullback, EMA touched within the last 3 bars+2R3
Every SignalLike Classic Pullback, takes every signal+1R20 (technical cap)
London Open 7AMChecks 7:00 UTC only each day, H4 rising+2R3

Source: trading-research-lab/.ai/evidence/champion-rerun-2026-09-17/forward-demo/BRIEF-brain-forward-demo-C-D.md(not published) · BRIEF-brain-ea-4-modes-v0-v1.md · BRIEF-brain-ea-5-modes-v1.md

2. Multi-year backtest, two data sources

Test each strategy against a long history of past prices from two independent data providers — Exness (2016–2026) and Dukascopy (2005–2023) — so results don't depend on one source's quirks.

All 5 strategies have gone through this step.

Show results per strategy

Same period for all: Exness data 2016–2023, $50 risk per trade, before swap. “—” = no data yet.

StrategyTradesAvg per tradeProfit factorNet profitMax drawdownDukascopy (longer data)
Classic Pullback909+0.262R1.40+$10,918$2,9572005–2023: +$26,694 · lost 5/19 years
Near-Touch Pullback1,174+0.265R1.41+$14,129$3,2952005–2023: +$32,062 · lost 4/19 years
3-Bar Pullback1,082+0.273R1.42+$13,497$3,5942005–2023: +$30,428 · lost 6/19 years
Every Signal1,665+0.231R1.45+$17,050$4,3512005–2023: +$42,901 · lost 5/19 years
London Open 7AM337+0.323R1.49+$4,806$1,5152005–2023: +$11,373 · lost 6/19 years

Average profit per trade (R), Exness 2016–2023

3. Robustness testing

Try changing trading costs (spread, slippage), nudging parameters, running tens of thousands of random simulations (Monte Carlo), and splitting the data in half — to see if results hold up, or only look good under one specific setup.

Released version (24/7): all 4 Pullback/Every Signal strategies pass this preliminary round, and so does London Open 7AM.

Show results per strategy
StrategyDouble costsParameter tweak: worst dropFirst / second halfProp-account blow-up risk at $100/tradeResult
Classic Pullback+0.218R−17%+0.295R / +0.230R3.2%
Near-Touch Pullback+0.232R−24%+0.260R / +0.270R6.6%
3-Bar Pullback+0.215R−23%+0.304R / +0.241R6.3%
Every Signal+0.217R−43%+0.228R / +0.233R12.4%
London Open 7AM+0.359R−38%+0.259R / +0.381R0.0%

Small parameter tweaks: worst drop in average profit (%)

4. Official statistical validation

The strictest step: a formal statistical test (Holm correction) to rule out the possibility that good-looking results are just luck from trying many variants.

All 5 strategies have run this step — and all 5 FAILED. We couldn't rule out that the good results are just luck.

Show results per strategy

Chance the result is just luck (Holm-adjusted)

StrategyTradesAvg per tradeChance it's just luckResult
Classic Pullback909+0.262R12.8%
Near-Touch Pullback1,174+0.265R12.8%
3-Bar Pullback1,082+0.273R12.8%
Every Signal1,665+0.231R12.8%
London Open 7AM337+0.323R6.4%

Source: trading-research-lab/artifacts/research/rl12-cv1/rl10-d-2b7e1e06b23209bd/outcome.json(not published) · trading-research-lab/artifacts/research/rl11-l07s/rl10-d-ef6a339beda7a1c2/outcome.json(not published)

5. Trade-by-trade match against MT5

Compare every single trade between the research engine and the EA actually running on MetaTrader 5 — to make sure the EA does exactly what was calculated, with no coding mismatch.

All 5 strategies compared research vs MT5 Strategy Tester for 2025: 92–98% of trades match to the entry minute, and almost 100% of matched trades have the same win/loss outcome. This comparison used the filtered version; the 24/7 version hasn't been compared yet.

Show results per strategy
Classic Pullback122/126
Near-Touch Pullback165/168
3-Bar Pullback150/154
Every Signal175/181
London Open 7AM61/66

Source: Reported by Panda in HANDOFF.md (2026-09-19) — no evidence file in the repo yet. Compares the 5-mode EA to the 4-mode EA.(not published)

6. Real demo run (no money at risk)

Attach the EA to a demo account to measure real costs (slippage, spread) and check whether the system behaves as the backtest predicted.

The original version (fixed-dollar thresholds) is running on a real demo account. The 5 strategies on this site (the volatility-scaled version) are currently only backtested in MT5 — a real demo run for this group hasn't started.

Show results per strategy
  • Not yetClassic PullbackOriginal ($-fixed) version running on demo; not enough data to report.
  • Not yetNear-Touch PullbackNot started.
  • Not yet3-Bar PullbackNot started.
  • Not yetEvery SignalOriginal ($-fixed) version running on demo; not enough data to report.
  • Not yetLondon Open 7AMNot started.

Source: trading-research-lab/.ai/evidence/champion-rerun-2026-09-17/forward-demo/BRIEF-brain-forward-demo-C-D.md §0(not published)

About 190 configurations tried on the same data

This number matters as much as the results. The more variants you try on one dataset, the easier it is to land on something that only looks good by luck. That's why a good-looking result isn't enough on its own.

Show results per strategy
  • By date: about 104 configurations when building the R-step exit family (Sep 17) → about 130 → about 136 when switching thresholds to ATR → about 142 when loosening the pullback rule → about 150 (Sep 18) → about 40 more on Sep 19, including the 24/7 variant.
  • Formal validation corrects for the number of tests within one family (Holm correction), but it does NOT correct for choosing the 24/7 variant after seeing the numbers on that same data — research states this explicitly.
  • All of it ran on the same Exness 2016–2023 data. There is still no stretch of data that was never looked at, for a truly independent check.

Source: trading-research-lab/.ai/evidence/champion-rerun-2026-09-17/CANDIDATE-step-r-2026-09-17.md(not published) · robustness-atr/REPORT.md · robustness-pullback/REPORT.md · trading-research-lab/.ai/CHECKPOINT-2026-09-18b-atr-p1b-swap-random-baseline.md(not published) · CHECKPOINT-2026-09-19-web-numbers-va-rl13-24h.md(not published)

Real money should only be considered after a strategy has gone through ALL of the steps above. None has reached the final step yet. This process is an attempt to get it right, NOT a guarantee. The process itself can be wrong: criteria that don't fit, gaps in the data, or something the people doing it simply missed. This site records a few such cases — a hidden filter that prettified numbers, and an ATR computed the wrong way. Both were caught by re-checking our own work, and there may be mistakes nobody has spotted yet.

Same core idea, different signal filters

5 strategies

All five catch an uptrend on XAUUSD, M15 timeframe, when price has just pulled back toward a moving average and bounced back up — long only. They differ in signal filters and how the stop-loss trails. None has completed official validation yet — see Validation journey.

A few terms you'll see

R
The amount of money you're risking on one trade (the distance from entry to stop-loss). '+2R profit' means twice the amount you risked.
SL (Stop-Loss)
The price at which, if hit, the trade closes automatically to stop further loss.
Drawdown
How far the account has fallen from its most recent peak — a measure of 'the worst it's gotten so far'.
EMA34 / EMA89
A moving average of price over the last 34 or 89 bars — used to read the trend.
ATR14
The average price movement over the last 14 bars — bigger when gold is more volatile.
ADX14
A measure of how strong a trend is — higher means a clearer trend (doesn't say up or down).

Classic Pullback

Code: C_V1

The original setup: enter when price pulls back to a moving average, then bounces back up strongly. The released version checks every hour of the trading week.

Entry conditions
  • Checks every hour of the trading week — the released version applies no session filter.
  • Trend is strong enough (ADX14 ≥ 22) and the moving average is clearly sloping up.
  • Recent price range is wide enough relative to typical daily movement (measured by ATR14).
  • Higher timeframes (H1, H4) also confirm the uptrend.
  • The prior bar touched or dipped into the EMA34/EMA89 zone — i.e. a pullback just happened.
  • The signal bar closes green, bouncing back above the EMA34/EMA89 zone.
  • Daily stop rule hasn't triggered, and there's room to open a new trade.
Initial stop-loss
Set just below the EMA89 at the signal bar, offset by a distance based on ATR14 (recent volatility).
How the stop-loss trails
  • At +2R profit ⇒ move the stop-loss to the entry price (break-even).
  • At +3R ⇒ move it up to lock in +1R.
  • At +4R ⇒ move it up to lock in +2R, and so on: each new whole-R level locks in one more R.
  • The stop only ever moves tighter, never looser.
Max open trades
Up to 3 trades open at the same time.
Daily stop rule
Count closed trades with pnl ≤ 0 by UTC day; once 2 losses are reached, no new trade opens for the rest of that day.
Known weaknesses
  • Statistically, a true edge of zero can't be ruled out yet.
  • Most of the profit comes from a handful of big-trend trades — drop the best 10 and the average falls to just +0.07R/trade (measured on the filtered version; not yet measured for 24/7).
  • Formal statistical validation of the 24/7 version (RL-13, 2026-09-20): FAILED — 12.8% chance it's just luck (needs under 5%).

Near-Touch Pullback

Code: C_V1_P1b

Identical to Classic Pullback, with one thing relaxed: price only needs to pull back CLOSE to the moving average (not touch it exactly) to count.

Entry conditions
  • Every Classic Pullback condition, except the pullback condition.
  • A pullback now counts if price touches the moving average as before, OR gets within a small distance of it (based on ATR14) — a 'near miss' also qualifies.
Initial stop-loss
Same as Classic Pullback.
How the stop-loss trails
  • Identical to Classic Pullback's ladder (lock break-even at +2R, then +1R per whole R level after).
Max open trades
Up to 3 trades open at the same time.
Daily stop rule
Count closed trades with pnl ≤ 0 by UTC day; once 2 losses are reached, no new trade opens for the rest of that day.
Known weaknesses
  • This relaxed condition was chosen AFTER trying about 140 different variants and seeing which numbers looked good — a risk of having picked the best-looking one by chance, despite passing a few robustness checks.
  • Preliminary checks looked promising, but the formal validation that followed still failed (see below).
  • Formal statistical validation of the 24/7 version (RL-13, 2026-09-20): FAILED — 12.8% chance it's just luck (needs under 5%).

3-Bar Pullback

Code: C_V1_P2

Also Classic Pullback, with the pullback condition relaxed a different way: it now counts if ANY of the last 3 bars (not just the one right before) touched the moving average.

Entry conditions
  • Every Classic Pullback condition, except the pullback condition.
  • A pullback now counts if at least 1 of the last 3 bars touched or dipped into its own moving-average zone.
Initial stop-loss
Same as Classic Pullback.
How the stop-loss trails
  • Identical to Classic Pullback.
Max open trades
Up to 3 trades open at the same time.
Daily stop rule
Count closed trades with pnl ≤ 0 by UTC day; once 2 losses are reached, no new trade opens for the rest of that day.
Known weaknesses
  • Also chosen after scanning a wide parameter grid — the same selection risk as Near-Touch Pullback.
  • Preliminary checks looked promising, but the formal validation that followed still failed (see below).
  • Formal statistical validation of the 24/7 version (RL-13, 2026-09-20): FAILED — 12.8% chance it's just luck (needs under 5%).

Every Signal

Code: D_V1

Same entry condition as Classic Pullback, but with NO cap on simultaneously open trades, and it locks in break-even sooner, at just +1R.

Entry conditions
  • Identical entry condition to Classic Pullback.
  • The only difference: every valid signal opens a trade — no cap on open trades the way Classic Pullback has (just a 20-trade technical safety ceiling).
Initial stop-loss
Same as Classic Pullback.
How the stop-loss trails
  • At +1R profit ⇒ move the stop-loss to break-even (one level earlier than Classic Pullback).
  • At +3R ⇒ move it up to lock in +1R.
  • At +4R ⇒ move it up to lock in +2R, and so on: each new whole-R level locks in one more R.
Max open trades
No design limit (backtests peaked at 13 simultaneous trades on Exness, 19 on Dukascopy); the EA enforces a technical cap of 20.
Daily stop rule
Count closed trades with pnl ≤ 0 by UTC day; once 2 losses are reached, no new trade opens for the rest of that day.
Known weaknesses
  • The most width-sensitive of the group: widening the dragon-band threshold by 1.25× cuts average profit by 43%.
  • No cap on open trades means many can lose together during a sharp move; backtest drawdown has exceeded the buffer of many prop-firm accounts.
  • Formal statistical validation of the 24/7 version (RL-13, 2026-09-20): FAILED — 12.8% chance it's just luck (needs under 5%).

London Open 7AM

Code: L07S

Completely different from the other four: it only looks at ONE moment per day — 7am UTC, the London session open.

Entry conditions
  • Only evaluates one moment per day: 7:00 UTC, Monday through Friday.
  • The higher timeframe (H4) confirms an uptrend.
  • The EMA34 moving average is sloping up strongly enough relative to recent volatility.
Initial stop-loss
Set just below the EMA89 at 7:00, entering at the open 15 minutes later.
How the stop-loss trails
  • Identical to Classic Pullback's ladder (lock break-even at +2R, then +1R per whole R level after).
Max open trades
Up to 3 trades open at the same time.
Daily stop rule
Count closed trades with pnl ≤ 0 by UTC day; once 2 losses are reached, no new trade opens for the rest of that day.
Known weaknesses
  • Formal statistical validation (RL-11): FAILED — 6.4% chance it's just luck (needs under 5%).
  • Sensitive to the stop distance: tightening it 25% cuts average profit by 38%. Drop the best 10 trades and it turns negative (Exness 2016–2023).
  • Very few trades per year (around 40) — many years of data would be needed to draw a firm conclusion.

Real numbers from the MT5 Strategy Tester

Backtest results

The data below is a static snapshot exported from the MT5 Strategy Tester — it does not auto-update and is not connected to any live account. The list of runs will keep growing as new results come in; not every year/strategy has been run yet.

Strategy Tester setup: MT5 Strategy Tester · Exness-MT5Trial14 · XAUUSDm M15 · deposit $50.000 · RiskUsd $50/lệnh · không trễ khớp · giờ server UTC+0 · EA 5 chế độ, chạy 24/24 (KHÔNG lọc giờ) — bản khớp mã nguồn công khai

A note on ticks: Exness trial chỉ có tick thật từ 2026-01-01; 2018–2025 dùng tick dựng từ nến M1. Trước 2018 tài khoản này không có tick nên không chạy được. Kết quả là in-sample, chưa qua kiểm định.

Generated: 2026-09-20

Individual runs (45)

Which markets suit the bot

When to run it, when to switch it off

The bot only BUYS, so it lives off periods when gold is clearly rising. This section sums up what past data shows — and says plainly what nobody has measured yet, so you don't have to guess.

19 years: which were up, which were down

Yearly profit/loss risking $50 per trade, re-run on Dukascopy price data 2005–2023 with the exact validated logic (Wilder ATR). Exploratory backtest, not validation. Red = losing year.

Classic Pullback C_V1

Dukascopy 2005–2023 · Losing years: 2012, 2013, 2015, 2018, 2021 (5/19)

Exness 2016 → Aug 2026 · Losing years: 2018, 2021 (2/11)

Near-Touch Pullback C_V1_P1b

Dukascopy 2005–2023 · Losing years: 2012, 2013, 2018, 2021 (4/19)

Exness 2016 → Aug 2026 · Losing years: 2018, 2021 (2/11)

3-Bar Pullback C_V1_P2

Dukascopy 2005–2023 · Losing years: 2012, 2013, 2014, 2015, 2018, 2021 (6/19)

Exness 2016 → Aug 2026 · Losing years: 2018, 2021 (2/11)

Every Signal D_V1

Dukascopy 2005–2023 · Losing years: 2012, 2013, 2018, 2021, 2022 (5/19)

Exness 2016 → Aug 2026 · Losing years: 2018, 2021, 2022 (3/11)

London Open 7AM L07S

Dukascopy 2005–2023 · Losing years: 2012, 2013, 2015, 2018, 2021, 2022 (6/19)

⚠ From 2024 on, this sits inside data that has been looked at many times (contaminated holdout) — descriptive only, not evidence. The last three years look much better mainly because gold rose strongly and steadily.

The bot does better when

  • Gold is in an uptrend

    The bot only buys. In years when gold rose steadily it tended to profit; in years of long declines it tended to lose.

    Show the numbers
    • Dukascopy 2005–2023 (24/7 version): Near-Touch lost in 4/19 years; Classic Pullback and Every Signal in 5/19; 3-Bar Pullback and London Open 7AM in 6/19. All 5 lost in 2012, 2013, 2018 and 2021.
    • 2012 and 2013 were back-to-back losing years for all 5 strategies. Over 2012–2014, simply buying and holding gold lost about 24% (Dukascopy data).
  • The bot trades every hour of the week

    The released version has no session filter: every valid signal is taken, including the Asian night session. The figures on this site are for that version.

    Show the numbers
    • The 0:00–6:00 UTC block (Exness 2016–2023) was profitable: Classic Pullback 288 trades +0.14R; Near-Touch 411 trades +0.25R; 3-Bar 386 trades +0.38R; Every Signal 503 trades +0.22R.
    • The 20:00–23:00 UTC block was slightly negative for the Pullback group. Versus the 7:00–19:00 filtered version: about 27% more trades, while average profit per trade barely moves (+0.262R vs +0.271R).

Consider switching off, or not starting, when

  • 2018 was the worst year: all 5 strategies lost

    On MT5, all 5 strategies lost money in 2018, four of them about $4,000 at $50 risk per trade. 2019 was slightly negative; 2021 and 2022 also lost. One year like that is enough to wipe out the room on a 50K prop account.

    Show the numbers
    • 2018: Classic Pullback −$4,013 (profit factor 0.21; 53-trade losing streak) · 3-Bar Pullback −$4,064 · Near-Touch −$3,810 · Every Signal −$3,653 · London Open 7AM −$1,215.
    • Multi-year drawdowns are larger still, because losing years stack up.

    Source: data/backtests.json (MT5 Strategy Tester, 24/7 version)(not published)

  • You can't stomach a long losing streak

    Most losing trades are small and close fast; the profit comes from a handful of trades that run very far. If you plan to switch off after a few losing weeks, you may switch off right before the big winner — and keep only the losses.

    Show the numbers
    • Removing exactly the 10 best trades out of 909–1,665: average profit drops 42–60% on Exness 2016–2023 (Classic Pullback: +0.262R down to +0.104R). Over 19 years of Dukascopy data the loss is 20–28%.
    • Winners are held a median of 85–121 hours (3.5–5 days); losers are cut after 7–11 hours. So each winner carries 3–5 nights of swap and usually sits through a weekend.
    • The backtest history includes losing streaks of 29–81 trades and periods of 1.9–6.1 years below the equity peak. For Every Signal on Exness, one 1,235-day drawdown had still NOT recovered by the end of the data.
  • A prop firm account is close to its loss limit

    The bot can hold several trades at once. If the account has little room left before the firm's cut-off, one reversal can cost you the account. Switch off or lower the risk per trade.

    Show the numbers
    • Largest MT5 drawdown at $50/trade (2020→2026, after swap): Every Signal $5,640, Classic Pullback $4,308, Near-Touch $3,528, 3-Bar Pullback $3,259, London Open 7AM $1,952. In 2018 alone, four of them drew down more than $4,000 within that single year. Closed trades only; with floating losses it is larger.
  • Overnight fees (swap) are high

    Winning trades are usually held overnight, and every night costs swap. A broker with high swap on gold longs eats into the profit.

    Show the numbers
    • Estimated from MT5 Vantage 2025: each day a trade is held costs about 0.04R in swap.

What there's NO basis for yet

  • Auto-pausing the bot when gold turns into a long downtrend

    We tried making the bot pause when gold's long-term trend turns down. On data not used for design (2005–2014), this classification predicted no better than chance. So there is no reliable "switch off when…" rule yet.

    Show the numbers
    • 20-day forward return difference between days labelled 'up' and 'down': every 95% confidence interval contains 0, for all 3 labelling rules tried.
  • Big news (Non-Farm Payrolls, CPI)

    Measured on 201 NFP and CPI releases (2016–2023). Very few trades were opened around release time, not enough to conclude anything. Trades held open through a release look more profitable, but shifting the news calendar by 1–2 weeks (fake releases) gives the same pattern. So it isn't the news — trades held longer simply tend to be winners. There's a weak hint that holding through a release is slightly worse, but not enough to make a rule. So there's no basis for switching the bot on or off around news.

    Show the numbers
    • Entries within ±2h of a release: only 13–25 trades per strategy (0 for London Open 7AM); every 95% confidence interval contains 0.
    • Trades held through a release, Classic Pullback: +1.63R/trade with real dates; with fake dates shifted ±1–2 weeks: +2.11 to +3.21R/trade — even higher.

Including the steps that failed

Validation journey

Each milestone has a plain one-line summary. To see the actual test numbers, click "Show validation results" on that milestone.

Where things stand (2026-09-19)

In short: no strategy has been shown to have a real edge.

  • The research process's general robustness test: no strategy has passed.
  • All 5 strategies went through formal statistical validation — and all 5 failed. Meaning: we couldn't rule out that the good results were luck.
  • Chance the results are just luck: 12.8% for the 4 Pullback/Every Signal strategies (the released 24/7 version), 6.4% for London Open 7AM. The pass line is under 5%.
  • The new EA matches the old EA trade-for-trade on MT5 (129/129 and 180/180 trades, 2025) — so no new coding bugs. This does NOT prove the bot is profitable.
  • The original version is running on a demo account (play money) to measure real costs.
Building the system (20 Aug → 17 Sep 2026) (9)

Detail from day one, for anyone who wants to read closely. Including the directions we dropped.

  1. 2026-08-20

    Building the research lab

    Starting from zero: writing software to test strategies on past data (backtesting), for gold XAUUSD only.

    Show validation results
    • First commit of the research repo: “Initial commit: xau-strategy-lab quant research/backtest lab”.

    Source: trading-research-lab git log (first commit, 2026-08-20)

  2. 2026-08-21

    Collecting tick data from 3 sources and auditing it

    Downloaded gold tick data from Dukascopy, HistData and Exness, then checked it for gaps and errors before use.

    Show validation results
    • Audited the Dukascopy/HistData pipeline, normalised Exness 2020–2026, documented mid-year source cut-offs.
    • HistData was later excluded from the numbers because it didn't meet completeness requirements.

    Source: trading-research-lab git log (2026-08-21) · trading-research-lab/docs/audit/2026-08-24-data-pipeline-audit-histdata-exness.md(not published)

  3. 2026-08-21

    Building the stress-test suite (L5) — and the first strategy fails

    Wrote 6 robustness tests (higher costs, delayed orders, shuffling, random simulation). Ran them on the original Sonic R strategy right away: it failed.

    Show validation results
    • 6/6 L5 tests done, 107/107 software tests pass.
    • Then applied L5 to ema_trend, breakout, mean_reversion and tuned sonic_r: none passed.

    Source: trading-research-lab git log (2026-08-21) · trading-research-lab/docs/roadmap-quant-trading.md (L5)(not published)

  4. 2026-08-21

    Many ideas in one day: pyramiding, trailing, time filters

    Tried adding to winners (pyramiding), trailing stops, combining strategies… Many looked good on the full data but were uneven when split over time.

    Show validation results
    • The default trailing stop turned out to hurt results; switched off.
    • Walk-forward for pyramiding: uneven across periods; full-range numbers shouldn't be trusted.
    • Found that _run_sim() silently dropped SELL trades and trades after 2 daily losses — a hidden filter that prettified numbers.

    Source: trading-research-lab/docs/roadmap-quant-trading.md (2026-08-21 updates)(not published)

  5. 2026-08-22

    Split into 2 systems: research and live trading

    Research and order execution became two separate codebases that don't use each other's code. Risk rules are written once and shared, so backtests and live trading compute the same way.

    Show validation results
    • Two repos: trading-research-lab (research) and panda-trading-brain (live). They only exchange approved result files and the shared trading-contracts library.

    Source: trading-quant/CLAUDE.md (QĐ-F, QĐ-H)(not published)

  6. 2026-08-27 → 2026-09-06

    One way to build candles, Dukascopy admitted as second source

    All M15/H1/H4 candles are rebuilt from ticks by a single piece of code. Dukascopy CSV data was checked before being allowed as a cross-check source.

    Show validation results
    • RL-6: Canonical Bar Builder + MarketContext.
    • RL-7: dukascopy_csv provider admission, done 2026-09-06.

    Source: trading-research-lab/docs/roadmap-quant-trading.md (RL-6 / RL-7)(not published)

  7. 2026-09-06

    A pre-registered family of 7 hypotheses: 0/7 supported

    Wrote down 7 ideas to test in advance, ran exactly as written. None passed. One filter had a real effect, but only turned a losing strategy into a smaller loser.

    Show validation results
    • Family XAU7_20260905: 0/7 SUPPORTED, all Holm p = 1.0.
    • H05 (squeeze filter): +0.14R/+0.18R improvement but still negative in absolute terms (−0.03R / −0.02R).

    Source: trading-research-lab/docs/roadmap-quant-trading.md (XAU7)(not published)

  8. 2026-09-16

    Test plans must be written down before running

    From here on, every validation must lock its pass/fail criteria before running — so criteria can't be adjusted after seeing results.

    Show validation results
    • Schema study-prereg/1, deterministic candidate derivation, frozen from a committed spec (T3-3).

    Source: trading-research-lab git log (2026-09-16)

  9. 2026-09-17

    Re-measuring the old set and trying R-step exits

    Re-measured the CHAMPION set, then tried moving the stop-loss up in steps as profit grows (2R, 3R…). This is where the Pullback and Every Signal strategies on this page came from.

    Show validation results
    • CHAMPION C1 re-measure + step-R exit candidates A–D; robustness gate added to the research process.

    Source: trading-research-lab git log (2026-09-17)

  1. 2026-09-20

    Dropping the session filter (24/7) — also FAILED

    Removing the session filter gives more trades and higher total profit, but formal validation still failed — just as the filtered version did before it. Panda chose to release this 24/7 version anyway, and the figures on this site are for it. Neither version has a basis for trading real money.

    Show validation results
    • Chance the result is just luck: 12.8% (needs under 5%). Every Signal also failed a second condition: median quarterly profit factor below 1 (0.997).
    • Average profit per trade barely moved: +0.262R vs +0.271R for the filtered version. The higher total comes mostly from more trades (909 vs 718, +27%).
    • Research notes explicitly: the 24/7 variant was chosen AFTER seeing the numbers on the same data, so the Holm correction doesn't account for that selection.

    Source: trading-research-lab/artifacts/research/rl13-cv1-24h/rl10-d-1db0d0c8e9afeae7/outcome.json(not published) · trading-research-lab/.ai/CHECKPOINT-2026-09-20b-rl13-ket-qua.md(not published)

  2. 2026-09-19

    Formal validation of the other 4 strategies — all 4 FAILED

    Classic Pullback, Near-Touch Pullback, 3-Bar Pullback and Every Signal were formally validated against criteria written down in advance. All 4 failed. Together with London Open 7AM, all 5 strategies have now failed. There's no basis for trading real money; the demo run continues as the only source of new data.

    Show validation results
    • Data: Exness 2016–2023. RL-10 criteria: mean R > 0.05R, weekly block bootstrap, Holm correction, α = 0.05.
    • Holm p = 0.238 for all 4 (needs < 0.05). Trades: 718 · 976 · 860 · 1,136. Mean R (before swap): +0.271 · +0.246 · +0.252 · +0.235.
    • Also found: the earlier exploratory expectations computed ATR the wrong way (EMA instead of Wilder) due to a column mix-up in a script. The EA uses Wilder as designed and needs no change.

    Source: trading-research-lab/artifacts/research/rl12-cv1/rl10-d-2b7e1e06b23209bd/outcome.json(not published) · forward-demo/NOTE-research-2026-09-19-rl12-verdict-va-so-wilder.md

  3. 2026-08-21

    Robustness test (L5): no strategy passed

    Strategies in the research library were stress-tested many ways: higher costs, delayed orders, shuffled trade order. None held up, even after parameter tuning.

    Show validation results
    • The gate includes Monte Carlo, bootstrap, spread/slippage/latency stress and price noise.
    • Tested: original sonic_r plus 12 tuned combos, ema_trend, breakout, mean_reversion. Result: none passed.

    Source: trading-research-lab/roadmap-quant-trading.md (lines 36, 137–170)(not published)

  4. 2026-09-08 → 2026-09-12

    Older parameter set (CHAMPION) failed formal validation

    An older strategy family (not the 5 on this page) was formally validated in 3 configurations. All 3 failed.

    Show validation results
    • Pre-registered survival criterion: mean R > 0.05R (one-sided), 10,000 weekly block bootstraps, Holm correction.
    • 3 configurations (pyramid ≤ 8 layers, no pyramid, approx. sonic_default_v1): all DOES_NOT_SURVIVE, Holm p = 0.7835.

    Source: trading-research-lab/roadmap-quant-trading.md ('RL-10 ĐÓNG' section)(not published)

  5. 2026-09-12

    Found that old numbers had been 'prettified' — fixed

    Splitting the data into quarters, the typical result was below break-even. We also found a hidden filter that made numbers look better than they were. It has been removed from every script.

    Show validation results
    • 18-fold quarterly walk-forward: median profit factor 0.93 (below 1.0 means losing); only 8/18 folds net positive.
    • Hidden filter: dropped SHORT trades and trades after 2 daily losses, applied after the run. 17 scripts fixed, 6 deleted.

    Source: trading-research-lab/roadmap-quant-trading.md (line 921)(not published) · trading-quant/CLAUDE.md ('Rủi ro đang mở')(not published)

  6. 2026-09-18

    London Open 7AM: formal validation — FAILED

    Results look profitable, but the test couldn't rule out luck. It missed the threshold narrowly, but a fail is a fail.

    Show validation results
    • Data: Exness 2016–2023 (32 quarters), 337 trades.
    • Pre-registered: mean R > 0.05R, 10,000 weekly block bootstraps, Holm correction, α = 0.05.
    • Result: DOES_NOT_SURVIVE, Holm p = 0.063994 (needs < 0.05). An independent verifier re-ran it byte-for-byte identical.

    Source: trading-research-lab/artifacts/research/rl11-l07s/rl10-d-ef6a339beda7a1c2/outcome.json(not published)

  7. 2026-09-18

    Thresholds now scale with gold's volatility

    Gold in 2024–2026 trades far higher than before, so fixed-dollar thresholds no longer made sense. They now scale with recent volatility (ATR). Preliminary checks passed; Every Signal passed only narrowly.

    Show validation results
    • Three thresholds moved to ATR14 multiples: price band width, EMA34 slope, stop-loss buffer.
    • Preliminary checks: cost stress, parameter sensitivity, two half-periods, prop-account Monte Carlo.
  8. 2026-09-18

    Looser 'pullback' rule — Near-Touch and 3-Bar Pullback are born

    Both variants passed preliminary checks. But they were picked after trying about 140 options, so there's a risk we picked a lucky one.

    Show validation results
    • Parameter sensitivity fairly flat for both.
    • Formal validation later (RL-12, 2026-09-19): both FAILED.
  9. 2026-09-19

    New EA matches old EA on MT5

    Re-ran 2025 with the 5-mode EA: every trade matches the earlier 4-mode EA. This only checks for coding bugs; it doesn't prove profitability.

    Show validation results
    • Classic Pullback: 129/129 trades match. Every Signal: 180/180 trades match. MT5 Strategy Tester, 2025.

    Source: Reported by Panda in HANDOFF.md (2026-09-19) — no evidence file in the repo yet(not published)

  10. ongoing

    Demo run to measure real costs

    The original version runs on a demo account (play money) to measure slippage and spread and compare with the backtest. A few months of data can't prove profitability.

Download and check for yourself

Research documents

Every research file behind the numbers on this site. These are verbatim copies from the research repo, not a word changed (mostly in Vietnamese). Open the .md files in any text editor, or straight in the browser.

Formal validation (3)
  • Formal validation outcome, London Open 7AM (RL-11)

    outcomes/rl11-l07s.json · 469 KB

    Download

    sha256: 251f1cebc5b2d0bbb957374fbbc424d032f0315002e0257a801c75e03b7e4c79

  • Formal validation outcome, filtered version (RL-12)

    outcomes/rl12-cv1.json · 694 KB

    Download

    sha256: 9cbb561a9cdab3c251d569c8adbd37f87ecd9b52bc757681c1f697879ed78d0c

  • Formal validation outcome, 24/7 version (RL-13)

    outcomes/rl13-cv1-24h.json · 694 KB

    Download

    sha256: d1b727b9b874024cda877136ff96ff548af0527618d121b898fe41c4b58e3f79

24/7 version — the released one (4)
  • Extra numbers for the 24/7 version (by year, tail of winners, holding times)

    web-numbers-24h-2026-09-20/result.md · 7 KB

    Download

    sha256: 61539d5511f3b57abee294a4d4f42dff7cf19238e2b9f3e077709c13ac4e2020

  • Robustness gate for the 24/7 version (§1b)

    web-numbers-2026-09-19/gate-24h.md · 2 KB

    Download

    sha256: a8cf25e4d488e3dceed78c850d00b6f73b7f1f7cb5c3930af3b943cb9097e7ec

  • 24/7 vs session-filtered version (3 data sources)

    web-numbers-2026-09-19/result-24h.md · 6 KB

    Download

    sha256: d551c6b37e3a8c4d84deb6ee1966139b8386ee73bf0dd8f28db0065537c4b8a5

  • Web numbers re-run with Wilder ATR (5 modes)

    web-numbers-2026-09-19/result.md · 22 KB

    Download

    sha256: a0511ef9e7ba72a5352c36f0dd1f22c66c9cbe060698e92e06371c8f5f40526a

EA specs and notes sent to the execution side (3)
  • Formal validation results for all 5 modes (RL-12)

    forward-demo/NOTE-research-2026-09-19-rl12-verdict-va-so-wilder.md · 2 KB

    Download

    sha256: 4d5380c91129b31e579f85474d89d43e599fb8827204f8fc2c1707ccc431ba3a

  • 4-mode EA specification

    forward-demo/BRIEF-brain-ea-4-modes-v0-v1.md · 5 KB

    Download

    sha256: 60596396f5cc0d538a12faf8b2d1c3c4002201c454e4a3e67de857a70944f5fa

  • 5-mode EA specification

    forward-demo/BRIEF-brain-ea-5-modes-v1.md · 6 KB

    Download

    sha256: 31fb87065fa389374c7acc82ef6133c5c8ead689875fa7ef0c1eb00723df5c62

Data and price sources (4)
  • Comparing the Exness and Dukascopy data sources

    source-gap/source-gap.md · 3 KB

    Download

    sha256: d5388d2e94d053ab66f4e8c2489b05b2ff7b9dde017699ced3cb1859228d335e

  • Missing bars in Dukascopy

    source-gap/missing-bars.md · 1 KB

    Download

    sha256: 793c0c1fd23726c243cbfae03365c6f50272ee0336ce7ea3b183eeb828f08b25

  • Dukascopy 2005–2023 run — report

    duka-2005-2023/REPORT.md · 4 KB

    Download

    sha256: 879428636affd209d9435e2a2d00519780adf4698a2586458368b55d97a2bdaf

  • Dukascopy 2005–2023 run — tables

    duka-2005-2023/result.md · 3 KB

    Download

    sha256: 54d23412ef7a2d866b941bc8f0ced32d1b0db69ea98d495a27e4c3ba943d0c4d

Older numbers (filtered version, ATR-EMA — kept for reference) (8)
  • Year-by-year profit/loss

    yearly-4modes/yearly-4modes.md · 4 KB

    Download

    sha256: ba3951f40ae904f8b2f91d05833b38474c69626a9592ca67c8fef4d66b295907

  • $ vs ATR thresholds, 2024–2026 data, swap estimate

    atr-and-recent/result.md · 3 KB

    Download

    sha256: 17db5446e5fb0f5d58ed33ab4c05a494d30efd02c5fe5e5f4e89cfc903c3cef3

  • Robustness — Classic Pullback & Every Signal

    robustness-atr/REPORT.md · 3 KB

    Download

    sha256: b89ab07e995806579a8c991212741854de25464cadd889a04acfd7613bf6d847

  • Robustness — detailed tables (C/D)

    robustness-atr/table.md · 3 KB

    Download

    sha256: c0a7bdaa2e76114d495ebaf83e841947009d2febeb8620b6ad25dfbde849f45e

  • Robustness — Near-Touch & 3-Bar Pullback

    robustness-pullback/REPORT.md · 2 KB

    Download

    sha256: 380b103551aaf3dfa4af68ca7eae93811c3f86bfee868f0f58629f53a594203a

  • Robustness — detailed tables (P1b/P2)

    robustness-pullback/table.md · 3 KB

    Download

    sha256: 458f72455c6a953bc678751da41735280f129417873624211551d589532a0555

  • Robustness — London Open 7AM

    l07-robustness/result.md · 3 KB

    Download

    sha256: 9e16634474e921bf890979b4073e3ee820c6fd08d7f297a1a9a8fef676a6c5d0

  • 24/7 vs London–New York hours

    session-24h/result.md · 1 KB

    Download

    sha256: 38bdae07b26949aa8a09d4fea172cf4bcb261521bd4854549d94783a9987df1a

Extra studies: trend filter, news (4)
  • Long-trend filter + prop-account simulation

    regime-gate/REPORT.md · 5 KB

    Download

    sha256: e6c17ad3f28081da2bee64cba212fcf382e122a3456727794288a1f9d899eed9

  • Long-trend filter — by year

    regime-gate/yearly.md · 1 KB

    Download

    sha256: c8a2c110eead576d4d01d61ce6cff62adb45ab0fb60137f09d1096b822a3bcc7

  • Long-trend filter on 2005–2014 data

    regime-oos-2005-2014/RESULTS.md · 8 KB

    Download

    sha256: 7c04cb178a531b76c26d32ca4289e7cbd246fbc1e9cb46815e035c4256cb6656

  • Trades around NFP and CPI releases

    news-nfp-cpi/result.md · 4 KB

    Download

    sha256: 29a8a1a840441975a076ad33c3adbc81de5c21228dcfaff25ec03dea61884436

Each file comes with a sha256 hash so you can check the download matches the original.

One thing held back

  • BRIEF files sent to the execution side: they contain demo and prop-firm account numbers. Their full paths are still listed in the sources.

Setup and a guide to every setting

How to use it

The CLMCA EA has very few settings: pick a strategy, set your risk, pick your broker. The EA handles the rest.

Attach the EA to an XAUUSD M15 chart only

Every strategy and every number on this page was tested only on gold (XAUUSD), 15-minute timeframe. Don't use it on other timeframes (M5, H1…) or other pairs. On the wrong chart the EA refuses to run and logs an error in the Experts tab. Broker variants of the gold symbol (e.g. XAUUSDm) are fine as long as the name starts with XAUUSD.

Suggested configuration by account type

Vantage / IC Markets / PepperstoneExnessProp-firm account
ChartXAUUSD M15XAUUSDm M15 (or your account's gold symbol)Whatever the firm's broker uses
Broker — live/demoAutoAutoAuto
Broker — backtestingVantage, IC Markets… (New York time)Exness (GMT+0)Prop/European-time broker, or ask the firm
Risk byFixed $Fixed $Percent of balance, 0.1–0.25

A warning specifically for prop-firm accounts

On MT5 at $50/trade, backtests have drawn down as much as $5,640 (Every Signal), $4,308 (Classic Pullback), $3,528 (Near-Touch), $3,259 (3-Bar Pullback) and $1,952 (London Open 7AM) — Every Signal blows past the $4,000 room of a 50K prop account. In 2018 alone, four of them drew down more than $4,000 within that year. Read the firm's rules carefully (daily loss limit, static vs trailing max drawdown, daily reset time) before running. On a prop account, use percent-of-balance risk at a small setting, and run on demo first.

Installing

  1. Download CLMCA.mq5, or CLMCA.ex5 if you'd rather not compile it yourself.
  2. In MT5 choose File → Open Data Folder and drop the file into MQL5/Experts.
  3. If you took the .mq5: open MetaEditor and compile; it must finish with 0 errors.
  4. Drag CLMCA onto an XAUUSD M15 chart, enable Allow Algo Trading, then pick a strategy. You can load a .set file: Inputs tab → Load.
  5. The Common tab shows a bilingual description, the warnings and a link back to this site.
  6. To verify it yourself: download the multi-file bundle on GitHub, compile CLMCA_SelfTest.mq5 and run it. It must print PASS pass=76 fail=0.

Fixed rules, with no setting to change them

  • If entry is more than 60 seconds after the bar opens, the trade is skipped — the price no longer matches the backtest.
  • After 2 losing trades in one UTC day, the EA rests until the day ends. Counted per strategy.
  • Every trade has a hard stop below the EMA89. No take-profit, no martingale or grid, long only.
  • Runs only on an XAUUSD M15 chart; on the wrong chart it refuses to start.
  • The EA loads 12,000 M15 bars to compute indicators.
  • On a non-demo account the EA warns that it will trade real money, but does not block.

In progress: an “Entry hours” group that lets the EA run all day, or restrict entries by your computer's clock, or by UTC. London Open 7AM has no such option because it always enters on the 07:00 UTC bar.

What each EA input means

SettingWhat it meansWhat to useWhat changes if you change it
StrategyOne of 5: Classic Pullback · Near-Touch Pullback · 3-Bar Pullback · Every Signal · London Open 7AM.Read the 5 strategies section first.Changes entry rules, max open trades (3; 20 for Every Signal) and how the stop trails. Each strategy has its own magic number, so several can share one account without mixing trades.
Risk bySize trades by a fixed dollar amount, or by a percent of balance at entry.Fixed $ for a personal account; percent of balance for a prop account. The EA computes lot size from the stop distance and rounds DOWN. If the result is below the minimum lot, it skips the trade rather than rounding up.
Max loss $What you lose if the trade hits its stop. Used with “Fixed $”.Leave it at 50 to compare directly with the figures on this site.Hard-capped at 2% of balance: set it higher and the EA lowers it. Several trades can be open at once, so a day's real loss can be a multiple of this.
Max loss %Percent of balance risked per trade. Used with “Percent of balance”.0.1–0.25 for a prop account.Only accepts 0.01 to 2; outside that the EA won't run.
BrokerTells the EA your broker's server time so it can convert to UTC. Options: Auto · New York-time brokers · Exness (GMT+0) · European-time brokers.Live or demo: Auto. Backtesting: pick the exact broker.This is the easiest one to get wrong. The Strategy Tester has no real clock, so on Auto the EA refuses to run. Live, if the conversion is off by more than 5 minutes it stops and asks you to pick again.
Slippage (points)Maximum slippage accepted when sending an order.Leave the default 50.Too low and orders get rejected in fast markets.
MagicThe id the EA uses to recognise its own trades.Leave it at 0; the EA picks per strategy.Only change it to run two copies of the same strategy on one account.

Questions, feedback, or a coffee

Contact & Donate

Got a question about the EA, found a bug, or just want to say something — send a message or reach out directly below.

Have a strategy you want validated?

Send a description of your strategy through the form below. We offer free validation, following the same process described in the Validation journey.

Condition: we review it first. The strategy needs entry, stop-loss and exit rules clear enough for a computer to run. Not every submission is accepted, and the validation result may well be a fail.

Send a message

This information is only used to reply — never stored or shared.

Donate

This EA is completely free and will always stay free. If it's been useful to you, you're welcome to buy me a coffee — entirely optional, and not tied to any promise of upgrades or priority support.

Support via PayPal

Donate via PayPal

Thanks for reading this far — whether you donate or not.