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
| Percentile | Condition | In sample R / trades | Out of sample R / trades | t | Trades to confirm | Last quarter R / trades | Verdict |
|---|---|---|---|---|---|---|---|
| p10, p25 | h4_trend_ema20_vs_ema50 > 0 | -77.5 R / 2352 | -70.7 R / 705 | -1.6 | 1,062 | -27.7 R / 200 | No 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)
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.
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).
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.
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.