Rule Collider

Backtests · GOLD · h4_trend_ema20_vs_ema50 · long

Does h4_trend_ema20_vs_ema50 above 0 work on GOLD? 2023 to 2026 backtest

GOLD long when H4 EMA20 above EMA50 is above the threshold, tested at five thresholds taken from the feature’s own distribution on GOLD over this window: its 10th, 25th, 50th, 75th and 90th percentiles. Window 2023-09-30 to 2026-09-30, the last 30 percent held out of sample; stop 2.5 ATR, target 3 R, held overnight, max spread 30 pips, one-minute confirmation 2 pips, no hour filter. Fills and spread as measured on a demo fleet (how a result is judged). The direction and the exit are the ones the research catalogue carried for this pair; the thresholds are not.

Five thresholds, one rule shape

PercentileConditionIn sample R / tradesOut of sample R / tradestTrades to confirmLast quarter R / tradesVerdict
p10, p25h4_trend_ema20_vs_ema50 > 0-77.5 R / 2352-70.7 R / 705-1.61,062-27.7 R / 200No edge shown

R is the risk on one trade. The out-of-sample split carries the verdict: below 100 trades it is “no edge shown” whatever the t; a positive mean with t below 2 is “net positive, not yet distinguishable from chance”; the last column is how many trades that mean would need to reach t = 2.

Each threshold in full

h4_trend_ema20_vs_ema50 > 0 (p10, p25)

Honesty panelNo edge shown

No edge shown out of sample: -70.7 R over 705 trades is -0.100 R per trade, within what chance produces (t = -1.6); about 1,062 trades would be needed to confirm this mean at t = -2, shown: 705.

In sample
2023-09-30 to 2025-11-05
-77.5 R
2352 trades · 33% wins
-0.033 R per trade · t = -0.9, within chance
about 10,519 trades to confirm this mean (-0.033 R per trade) at t = -2 · shown: 2352
spread 0.098 R per trade
Out of sample
2025-11-05 to 2026-09-30
-70.7 R
705 trades · 30% wins
-0.100 R per trade · t = -1.6, within chance
about 1,062 trades to confirm this mean (-0.100 R per trade) at t = -2 · shown: 705
spread 0.059 R per trade
Last quarter
last 91 days of the window
-27.7 R
200 trades · 28% wins
-0.138 R per trade · t = -1.2, within chance
about 565 trades to confirm this mean (-0.138 R per trade) at t = -2 · shown: 200
spread 0.083 R per trade
Costs. Spread 0.089 R per trade at 1.25 times the bar’s minimum (more than the trades made before spread); 509 fills in measured hot hours (01:00 at 3.9 times). Fill offset 0.08 stop-distances on every entry, measured on 732 demo fills. Note: the symbol's quoting precision changed on 2025-08-04; the spread field is converted with the point of each era. At 1.5 times the bar’s minimum the out-of-sample figure would read -79.0 R (-0.112 R per trade over 705 trades).

Entry: stop order 2 pips past the signal close, cancelled after 4 bars; 3,207 signals placed, 3,057 filled, 150 expired; trigger state, an entry on every bar the conditions hold while flat.

Exit: stop 2.5 ATR (mean 87.9 pips, 2.50 ATR, 13 raised to the 10-pip floor); target 3 R; exits 65% at the stop, 22% at the target, 13% at the day end.

Filters: signals on every weekday; no entries 22:00 to 01:00 broker time (6,254 bars); max spread 30 pips (2 bars over it); M1 confirmation 2 pips (583 signals rejected).

Monthly R, h4_trend_ema20_vs_ema50 > 0 on GOLDOne bar per month: the R earned that month; the held-out months in the full colour.2023-10: +27.8 R over 94 trades2023-102023-11: -0.3 R over 81 trades2023-12: -3.8 R over 106 trades2024-01: -15.3 R over 47 trades2024-02: -29.0 R over 85 trades2024-03: +20.1 R over 102 trades2024-04: -9.5 R over 113 trades2024-042024-05: -18.4 R over 71 trades2024-06: -18.3 R over 47 trades2024-07: +2.1 R over 96 trades2024-08: -17.4 R over 141 trades2024-09: +7.5 R over 123 trades2024-10: +7.4 R over 130 trades2024-102024-11: -12.1 R over 57 trades2024-12: -22.8 R over 52 trades2025-01: +4.5 R over 123 trades2025-02: +7.4 R over 129 trades2025-03: +15.0 R over 58 trades2025-04: -7.4 R over 110 trades2025-042025-05: -23.4 R over 78 trades2025-06: -10.7 R over 89 trades2025-07: -21.9 R over 93 trades2025-08: -13.3 R over 78 trades2025-09: +31.0 R over 140 trades2025-10: +23.3 R over 109 trades2025-102025-11: -1.7 R over 67 trades2025-12: +0.2 R over 143 trades2026-01: +16.1 R over 96 trades2026-02: -2.4 R over 55 trades2026-03: -19.5 R over 27 trades2026-04: -17.8 R over 81 trades2026-042026-05: -17.9 R over 36 trades2026-07: -43.0 R over 63 trades2026-08: +15.3 R over 137 trades+31 R-43 R

What h4_trend_ema20_vs_ema50 measures

H4 EMA20 above EMA50 (flag), on H4 bars. 1 when the H4 20-bar exponential average is above the 50-bar one on the last completed H4 bar.

Test your own variant

Rule Collider runs one rule on one symbol over years of broker M5 data with the fills and the spread a demo fleet measured, and shows the out-of-sample figure first. Early access goes to the waitlist in signup order.

Join the waitlist

Historical simulation on broker M5 data with a measured fill offset, a measured spread factor, swap and a one-minute confirmation model. Past results do not predict future results. This is a research tool, not investment advice. Hours are broker time, the chart time in MT5. Built 2026-11-04 from runs ending 2026-09-30; refreshed monthly.