Rule Collider

Backtests · GOLD · h4_ema20_slope · long

Does h4_ema20_slope above 25.994 work on GOLD? 2023 to 2026 backtest

GOLD long when H4 EMA20 slope 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
p10h4_ema20_slope > -172.8-186.6 R / 3356-117.9 R / 1052-2.2845-63.6 R / 386Active, net negative
p25h4_ema20_slope > -51.623-142.4 R / 2853-97.8 R / 874-2.0850-65.3 R / 299Active, net negative
p50h4_ema20_slope > 25.994+0.7 R / 1825-41.5 R / 676-1.02,886-29.7 R / 193No edge shown
p75h4_ema20_slope > 120.6-29.2 R / 770-18.0 R / 498-0.58,405-16.3 R / 148No edge shown
p90h4_ema20_slope > 244.8+17.0 R / 178-0.8 R / 323-0.02,101,418+7.8 R / 87No 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_ema20_slope > -172.8 (p10)

Honesty panelActive, net negative

Traded 1052 times out of sample, net negative beyond chance (-117.9 R, -0.112 R per trade, t = -2.2); still active in the last quarter (-63.6 R over 386 trades).

In sample
2023-09-30 to 2025-11-05
-186.6 R
3356 trades · 32% wins
-0.056 R per trade · t = -1.9, within chance
about 3,657 trades to confirm this mean (-0.056 R per trade) at t = -2 · shown: 3356
spread 0.104 R per trade
Out of sample
2025-11-05 to 2026-09-30
-117.9 R
1052 trades · 30% wins
-0.112 R per trade · t = -2.2, beyond chance
about 845 trades to confirm this mean (-0.112 R per trade) at t = -2 · shown: 1052
spread 0.064 R per trade
Last quarter
last 91 days of the window
-63.6 R
386 trades · 28% wins
-0.165 R per trade · t = -2.0, beyond chance
about 386 trades to confirm this mean (-0.165 R per trade) at t = -2 · shown: 386
spread 0.085 R per trade
Costs. Spread 0.094 R per trade at 1.25 times the bar’s minimum (more than the trades made before spread); 741 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 -131.4 R (-0.125 R per trade over 1052 trades).

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

Exit: stop 2.5 ATR (mean 81.8 pips, 2.50 ATR, 30 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 (2,188 bars); max spread 30 pips (0 bars over it); M1 confirmation 2 pips (897 signals rejected).

Monthly R, h4_ema20_slope > -172.8 on GOLDOne bar per month: the R earned that month; the held-out months in the full colour.2023-10: +18.3 R over 139 trades2023-102023-11: -12.9 R over 135 trades2023-12: -2.5 R over 130 trades2024-01: -22.5 R over 166 trades2024-02: -31.8 R over 142 trades2024-03: +20.1 R over 102 trades2024-04: -28.1 R over 145 trades2024-042024-05: -31.0 R over 152 trades2024-06: -32.7 R over 146 trades2024-07: +8.5 R over 141 trades2024-08: -15.2 R over 162 trades2024-09: +11.8 R over 133 trades2024-10: +2.8 R over 149 trades2024-102024-11: -16.7 R over 116 trades2024-12: -33.0 R over 137 trades2025-01: +9.8 R over 126 trades2025-02: +2.0 R over 135 trades2025-03: +18.6 R over 84 trades2025-04: -1.2 R over 109 trades2025-042025-05: -24.7 R over 114 trades2025-06: -23.4 R over 135 trades2025-07: -19.7 R over 148 trades2025-08: -26.6 R over 147 trades2025-09: +31.0 R over 140 trades2025-10: +18.1 R over 117 trades2025-102025-11: +14.0 R over 101 trades2025-12: +1.8 R over 130 trades2026-01: +18.4 R over 106 trades2026-02: -6.5 R over 72 trades2026-03: -17.4 R over 45 trades2026-04: -27.1 R over 109 trades2026-042026-05: -13.4 R over 63 trades2026-06: -29.8 R over 46 trades2026-07: -40.9 R over 139 trades2026-08: +19.3 R over 143 trades2026-09: -42.0 R over 104 trades+31 R-42 R

h4_ema20_slope > -51.623 (p25)

Honesty panelActive, net negative

Traded 874 times out of sample, net negative beyond chance (-97.8 R, -0.112 R per trade, t = -2.0); still active in the last quarter (-65.3 R over 299 trades).

In sample
2023-09-30 to 2025-11-05
-142.4 R
2853 trades · 33% wins
-0.050 R per trade · t = -1.6, within chance
about 4,565 trades to confirm this mean (-0.050 R per trade) at t = -2 · shown: 2853
spread 0.104 R per trade
Out of sample
2025-11-05 to 2026-09-30
-97.8 R
874 trades · 30% wins
-0.112 R per trade · t = -2.0, beyond chance
about 850 trades to confirm this mean (-0.112 R per trade) at t = -2 · shown: 874
spread 0.063 R per trade
Last quarter
last 91 days of the window
-65.3 R
299 trades · 26% wins
-0.218 R per trade · t = -2.4, beyond chance
about 213 trades to confirm this mean (-0.218 R per trade) at t = -2 · shown: 299
spread 0.085 R per trade
Costs. Spread 0.094 R per trade at 1.25 times the bar’s minimum (more than the trades made before spread); 608 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 -108.8 R (-0.124 R per trade over 874 trades).

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

Exit: stop 2.5 ATR (mean 81.7 pips, 2.50 ATR, 27 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 (4,284 bars); max spread 30 pips (0 bars over it); M1 confirmation 2 pips (774 signals rejected).

Monthly R, h4_ema20_slope > -51.623 on GOLDOne bar per month: the R earned that month; the held-out months in the full colour.2023-10: +31.5 R over 112 trades2023-102023-11: -6.8 R over 109 trades2023-12: -3.2 R over 101 trades2024-01: -25.0 R over 137 trades2024-02: -30.7 R over 125 trades2024-03: +20.1 R over 102 trades2024-04: -22.9 R over 132 trades2024-042024-05: -39.9 R over 134 trades2024-06: -41.1 R over 126 trades2024-07: +11.7 R over 117 trades2024-08: -12.7 R over 139 trades2024-09: +9.3 R over 133 trades2024-10: +4.3 R over 138 trades2024-102024-11: -10.4 R over 80 trades2024-12: -26.4 R over 102 trades2025-01: +5.9 R over 124 trades2025-02: +16.6 R over 118 trades2025-03: +15.2 R over 81 trades2025-04: -4.9 R over 91 trades2025-042025-05: -12.0 R over 72 trades2025-06: -20.9 R over 107 trades2025-07: -15.4 R over 110 trades2025-08: -34.1 R over 121 trades2025-09: +30.3 R over 135 trades2025-10: +23.5 R over 103 trades2025-102025-11: +9.6 R over 91 trades2025-12: -0.4 R over 128 trades2026-01: +19.1 R over 94 trades2026-02: -11.8 R over 65 trades2026-03: -15.4 R over 36 trades2026-04: -15.5 R over 84 trades2026-042026-05: -12.3 R over 57 trades2026-06: -10.3 R over 24 trades2026-07: -44.9 R over 98 trades2026-08: +11.5 R over 136 trades2026-09: -31.8 R over 65 trades+31 R-45 R

h4_ema20_slope > 25.994 (p50)

Honesty panelNo edge shown

No edge shown out of sample: -41.5 R over 676 trades is -0.061 R per trade, within what chance produces (t = -1.0); about 2,886 trades would be needed to confirm this mean at t = -2, shown: 676.

In sample
2023-09-30 to 2025-11-05
+0.7 R
1825 trades · 34% wins
+0.000 R per trade · t = 0.0, within chance
about 71,593,574 trades to confirm this mean (+0.000 R per trade) at t = 2 · shown: 1825
spread 0.099 R per trade
Out of sample
2025-11-05 to 2026-09-30
-41.5 R
676 trades · 31% wins
-0.061 R per trade · t = -1.0, within chance
about 2,886 trades to confirm this mean (-0.061 R per trade) at t = -2 · shown: 676
spread 0.058 R per trade
Last quarter
last 91 days of the window
-29.7 R
193 trades · 29% wins
-0.154 R per trade · t = -1.3, within chance
about 441 trades to confirm this mean (-0.154 R per trade) at t = -2 · shown: 193
spread 0.081 R per trade
Costs. Spread 0.088 R per trade at 1.25 times the bar’s minimum (more than the trades made before spread); 417 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 -49.3 R (-0.073 R per trade over 676 trades).

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

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

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

Monthly R, h4_ema20_slope > 25.994 on GOLDOne bar per month: the R earned that month; the held-out months in the full colour.2023-10: +32.6 R over 97 trades2023-102023-11: -0.2 R over 65 trades2023-12: -4.7 R over 68 trades2024-01: -10.9 R over 31 trades2024-02: -2.2 R over 30 trades2024-03: +9.9 R over 76 trades2024-04: -22.2 R over 101 trades2024-042024-05: -13.0 R over 59 trades2024-06: -28.7 R over 72 trades2024-07: +12.9 R over 74 trades2024-08: -34.9 R over 103 trades2024-09: +9.0 R over 83 trades2024-10: +4.9 R over 88 trades2024-102024-11: +4.5 R over 43 trades2024-12: -9.1 R over 34 trades2025-01: -1.9 R over 98 trades2025-02: +3.6 R over 104 trades2025-03: +11.9 R over 67 trades2025-04: +15.8 R over 68 trades2025-042025-05: -6.1 R over 57 trades2025-06: +0.5 R over 50 trades2025-07: -3.5 R over 62 trades2025-08: -14.1 R over 81 trades2025-09: +26.0 R over 122 trades2025-10: +20.6 R over 92 trades2025-102025-11: +6.9 R over 72 trades2025-12: +1.4 R over 101 trades2026-01: +12.6 R over 96 trades2026-02: -6.2 R over 59 trades2026-03: -13.1 R over 34 trades2026-04: -8.4 R over 69 trades2026-042026-05: +2.8 R over 30 trades2026-06: -7.8 R over 22 trades2026-07: -22.5 R over 56 trades2026-08: +7.0 R over 111 trades2026-09: -14.1 R over 26 trades+33 R-35 R

h4_ema20_slope > 120.6 (p75)

Honesty panelNo edge shown

No edge shown out of sample: -18.0 R over 498 trades is -0.036 R per trade, within what chance produces (t = -0.5); about 8,405 trades would be needed to confirm this mean at t = -2, shown: 498.

In sample
2023-09-30 to 2025-11-05
-29.2 R
770 trades · 32% wins
-0.038 R per trade · t = -0.6, within chance
about 7,709 trades to confirm this mean (-0.038 R per trade) at t = -2 · shown: 770
spread 0.074 R per trade
Out of sample
2025-11-05 to 2026-09-30
-18.0 R
498 trades · 33% wins
-0.036 R per trade · t = -0.5, within chance
about 8,405 trades to confirm this mean (-0.036 R per trade) at t = -2 · shown: 498
spread 0.057 R per trade
Last quarter
last 91 days of the window
-16.3 R
148 trades · 30% wins
-0.110 R per trade · t = -0.8, within chance
about 870 trades to confirm this mean (-0.110 R per trade) at t = -2 · shown: 148
spread 0.082 R per trade
Costs. Spread 0.067 R per trade at 1.25 times the bar’s minimum (more than the trades made before spread); 210 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 -23.6 R (-0.047 R per trade over 498 trades).

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

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

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

Monthly R, h4_ema20_slope > 120.6 on GOLDOne bar per month: the R earned that month; the held-out months in the full colour.2023-10: -4.3 R over 28 trades2023-102023-11: -1.6 R over 6 trades2023-12: -6.8 R over 12 trades2024-03: +7.7 R over 50 trades2024-04: -1.6 R over 56 trades2024-05: -20.7 R over 24 trades2024-06: -6.1 R over 5 trades2024-062024-07: -8.7 R over 21 trades2024-08: -11.1 R over 34 trades2024-09: +9.1 R over 33 trades2024-10: -2.6 R over 30 trades2024-11: +2.2 R over 33 trades2024-12: -5.1 R over 14 trades2024-122025-01: -19.5 R over 26 trades2025-02: -5.6 R over 41 trades2025-03: +9.0 R over 23 trades2025-04: +23.0 R over 55 trades2025-05: -6.0 R over 39 trades2025-06: -5.1 R over 25 trades2025-062025-07: -4.7 R over 24 trades2025-08: -4.6 R over 25 trades2025-09: +19.9 R over 86 trades2025-10: +13.8 R over 80 trades2025-11: +0.3 R over 54 trades2025-12: -4.5 R over 61 trades2025-122026-01: +31.0 R over 79 trades2026-02: -6.5 R over 50 trades2026-03: -11.1 R over 27 trades2026-04: -7.6 R over 46 trades2026-05: -2.4 R over 17 trades2026-06: -0.7 R over 16 trades2026-062026-07: -14.8 R over 34 trades2026-08: +6.7 R over 98 trades2026-09: -8.2 R over 16 trades+31 R-21 R

h4_ema20_slope > 244.8 (p90)

Honesty panelNo edge shown

No edge shown out of sample: -0.8 R over 323 trades is -0.002 R per trade, within what chance produces (t = -0.0); about 2,101,418 trades would be needed to confirm this mean at t = -2, shown: 323.

In sample
2023-09-30 to 2025-11-05
+17.0 R
178 trades · 34% wins
+0.095 R per trade · t = 0.7, within chance
about 1,323 trades to confirm this mean (+0.095 R per trade) at t = 2 · shown: 178
spread 0.049 R per trade
Out of sample
2025-11-05 to 2026-09-30
-0.8 R
323 trades · 33% wins
-0.002 R per trade · t = -0.0, within chance
about 2,101,418 trades to confirm this mean (-0.002 R per trade) at t = -2 · shown: 323
spread 0.054 R per trade
Last quarter
last 91 days of the window
+7.8 R
87 trades · 34% wins
+0.090 R per trade · t = 0.5, within chance
about 1,551 trades to confirm this mean (+0.090 R per trade) at t = 2 · shown: 87
spread 0.077 R per trade
Costs. Spread 0.052 R per trade at 1.25 times the bar’s minimum (62% of the gross); 105 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 -4.3 R (-0.013 R per trade over 323 trades).

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

Exit: stop 2.5 ATR (mean 161.9 pips, 2.50 ATR); target 3 R; exits 64% at the stop, 23% at the target, 13% at the day end.

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

Monthly R, h4_ema20_slope > 244.8 on GOLDOne bar per month: the R earned that month; the held-out months in the full colour.2025-03: -3.4 R over 3 trades2025-032025-04: +15.3 R over 39 trades2025-05: +1.9 R over 20 trades2025-06: -4.6 R over 9 trades2025-09: +1.4 R over 41 trades2025-10: +6.3 R over 66 trades2025-11: -3.2 R over 22 trades2025-112025-12: -4.6 R over 39 trades2026-01: +17.6 R over 72 trades2026-02: -7.9 R over 33 trades2026-03: -2.6 R over 15 trades2026-04: -10.9 R over 35 trades2026-05: +3.5 R over 8 trades2026-052026-06: -0.3 R over 12 trades2026-07: -5.3 R over 15 trades2026-08: +16.8 R over 69 trades2026-09: -3.6 R over 3 trades+18 R-11 R

What h4_ema20_slope measures

H4 EMA20 slope (pips), on H4 bars. Change of the H4 EMA20 over the last 5 H4 bars, in pips.

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.