Markets › Futures · NQ futures (5- and 15-minute bars, US session)
EMA 5/8/13 Ribbon Backtest: Nasdaq-100 Futures, 5- and 15-Minute Bars
Enter when the 5, 8 and 13-bar exponential averages line up, exit when they stop being lined up, US session only, on E-mini Nasdaq-100 futures, 2020 to 2026.
Buried · No proven edgeThe 15-minute ribbon beat the control. It did not clear the bar.
Variants tried: 8 · Passed every gate: 0 · Holdout opened: yes (already used)
Short answer: not proven. We backtested the EMA 5/8/13 ribbon on Nasdaq-100 futures in the US session, on 5- and 15-minute bars, in 8 variants net of costs. None passed every gate. On 15-minute bars three variants beat a matched control, but none reached the development t-statistic of 2.5; on 5-minute bars the variants tested did not show an edge.How much costs took here, compared across all 54 of our tests →
00The verdict in three lines
- The EMA 5/8/13 ribbon is a popular day-trading setup: go long when the 5-bar average is above the 8 and the 8 above the 13, short when the order is reversed, and get out when the order breaks. We tested it on NQ futures in the US session (entries from 09:30, everything closed at 16:00), on 5-minute and 15-minute bars, long only and long and short, with no stop and with a 1 R stop and a 2 R target: 8 variants, with the rules, costs, gates and a matched control fixed in a dated specification before any ribbon value was computed.
- None passed. On 15-minute bars three of the four variants beat the matched control and were positive in net R in every calendar year except 2025, but none reached the development t-statistic of 2.5 (the highest was 1.67) or a validation profit factor of 1.2. On 5-minute bars the variants tested did not show an edge under these conditions.
- The 15-minute ribbon is a candidate for a check on new data, not an edge. Every historical period used here, including the holdout, had already been used by an earlier test on this NQ file.
01What we tested
The averages: EMA(5), EMA(8) and EMA(13) of the bar closes, computed on every bar of the electronic session (the chart default), so the ribbon exists at the US open. Alignment at the close of a bar: bull if EMA5 > EMA8 > EMA13, bear if EMA5 < EMA8 < EMA13, otherwise none. Entry: when an alignment starts on a bar that closes after 09:30 and no later than 15:55 (5-minute) or 15:45 (15-minute) New York, at the open of the next 1-minute bar; a bull start opens a long, a bear start opens a short in the long-and-short versions. An alignment that began before the session gives no entry; only a new start does. Exit: at the next 1-minute open after the first bar on which the alignment is broken, at the stop or target, or at the close of the 16:00 bar (the exchange's earlier close on holiday early-close days; if a data hole covers the close, at the first price after it). No position is held overnight. R = 1.5 times the 14-bar ATR of the same timeframe at the signal bar; in the T2 versions the stop is 1 R and the target 2 R, the stop is taken if both are touched in the same minute, and a level gapped through fills at the open.
02Data and costs
E-mini Nasdaq-100 futures (NQ), back-adjusted continuous 1-minute history from NinjaTrader, 1 January 2020 to 25 September 2026, built into 475,280 5-minute and 158,502 15-minute bars. Periods: development 2020 to 2023, validation January 2024 to March 2025, holdout April 2025 to September 2026. These periods are not new: the same NQ file, years and holdout were used by our EMA 9/21 test, so the holdout here is reported as already used. Costs: $5.76 commission plus one tick ($5) of slippage on each fill, $15.76 a trade (0.79 points); no roll or overnight cost because every position is closed the same day. The commission is an assumption, not a broker quote.
Engine check: the exit on a broken alignment and the 16:00 exit needed a small new simulation module (rb_lib.js). Before the run, rb_selftest.js checked hand-built cases (no entry before 09:30 or after the last signal time, entry only on a new alignment, the 16:00 and early-close exits, a stop and a target in the same minute, a stop in the entry minute, a gap through the stop), the bars and the three averages against naive recomputations, and all 8 variants trade by trade against an independent minute-by-minute re-implementation (rb_selftest_result.txt).
03Results on 15-minute bars
Net R is the sum of the trades' results in R after costs; dollars are per contract. The 95% range is the Wilson interval for the win rate. The drawdown includes open losses.
| Variant | Rules | Trades | Net after costs | R per trade | $ per contract | Winners (95% range) | Profit factor | Drawdown incl. open losses | Verdict |
|---|---|---|---|---|---|---|---|---|---|
| M15-L-N | long only, no stop | 1,705 | +111 R | +0.06 R | +$77,624 | 693 of 1705 (38% to 43%) | 1.13 | -36.4 R | Buried |
| M15-L-T2 | long only, stop 1 R + target 2 R | 1,705 | +3 R | 0.00 R | -$5,735 | 652 of 1705 (36% to 41%) | 1.00 | -40.1 R | Buried |
| M15-LS-N | long and short, no stop | 3,341 | +165 R | +0.05 R | +$88,341 | 1307 of 3341 (37% to 41%) | 1.10 | -54.1 R | Buried |
| M15-LS-T2 | long and short, stop 1 R + target 2 R | 3,341 | +95 R | +0.03 R | +$61,640 | 1265 of 3341 (36% to 40%) | 1.06 | -44.6 R | Buried |
Why +3.1 R can sit next to -$5,735. The long-only version with a stop and a target made +3 R in R and lost $5,735 in dollars. One R is 1.5 times the ATR at each signal, so it is worth more dollars on volatile days than on quiet ones; a sum in R and a sum in dollars weigh the same trades differently. The gates are evaluated in R, the unit fixed in advance.
Cumulative net R by month for three variants. * Holdout already used before this test.
04Results on 5-minute bars
| Variant | Rules | Trades | Net after costs | R per trade | $ per contract | Winners (95% range) | Profit factor | Drawdown incl. open losses | Verdict |
|---|---|---|---|---|---|---|---|---|---|
| M5-L-N | long only, no stop | 5,476 | +44 R | +0.01 R | +$28,328 | 1912 of 5476 (34% to 36%) | 1.02 | -91.1 R | Buried |
| M5-L-T2 | long only, stop 1 R + target 2 R | 5,476 | -90 R | -0.02 R | -$4,803 | 1871 of 5476 (33% to 35%) | 0.96 | -129.8 R | Buried |
| M5-LS-N | long and short, no stop | 10,618 | -79 R | -0.01 R | -$65,290 | 3517 of 10618 (32% to 34%) | 0.99 | -222.5 R | Buried |
| M5-LS-T2 | long and short, stop 1 R + target 2 R | 10,618 | -259 R | -0.02 R | -$113,381 | 3464 of 10618 (32% to 34%) | 0.95 | -307.9 R | Buried |
The variants tested did not show an edge under these conditions: none beat the matched control, and three of the four had a negative validation period.
05By period and by year
| Variant | Development 2020 to 2023 | Validation 2024 to Mar 2025 | Holdout* Apr 2025 to Sep 2026 | Development t | Validation PF |
|---|---|---|---|---|---|
| M15-L-N | +82 R | +13 R | +15 R | 1.67 | 1.09 |
| M15-L-T2 | +8 R | -1 R | -4 R | 0.23 | 0.99 |
| M15-LS-N | +113 R | +47 R | +5 R | 1.61 | 1.15 |
| M15-LS-T2 | +68 R | +43 R | -15 R | 1.33 | 1.16 |
| M5-L-N | +63 R | -10 R | -9 R | 0.73 | 0.98 |
| M5-L-T2 | -56 R | -32 R | -2 R | -0.92 | 0.93 |
| M5-LS-N | -80 R | +42 R | -41 R | -0.66 | 1.04 |
| M5-LS-T2 | -166 R | -64 R | -29 R | -1.93 | 0.93 |
Net R by calendar year of entry
| Variant | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 (to Sep) |
|---|---|---|---|---|---|---|---|
| M15-L-N | +17.9 R | +24.9 R | +12.8 R | +26.8 R | +19.7 R | -9.7 R | +18.2 R |
| M15-L-T2 | +7.6 R | -14.8 R | +9.0 R | +6.4 R | -6.1 R | -2.5 R | +3.6 R |
| M15-LS-N | +25.7 R | +36.9 R | +27.5 R | +22.7 R | +43.9 R | -12.6 R | +20.5 R |
| M15-LS-T2 | +22.0 R | +24.5 R | +16.7 R | +4.3 R | +28.5 R | -8.5 R | +8.0 R |
| M5-L-N | +22.5 R | -13.4 R | +9.9 R | +43.6 R | -17.7 R | -2.8 R | +1.8 R |
| M5-L-T2 | +5.0 R | -63.2 R | -27.7 R | +30.4 R | -48.9 R | +17.3 R | -2.5 R |
| M5-LS-N | +7.7 R | -136.3 R | +28.9 R | +19.8 R | +12.4 R | +14.7 R | -26.3 R |
| M5-LS-T2 | +17.2 R | -152.2 R | -6.2 R | -24.3 R | -94.6 R | +23.0 R | -22.0 R |
In net R, three variants were positive in every calendar year except 2025: M15-L-N, M15-LS-N, M15-LS-T2 (2026 runs to September). No other variant was.
06How much of the gross profit the costs take
The cost per trade is small in R because R is large (median 20 points on 5-minute bars and 37 on 15-minute bars, against a cost of 0.79 points). But a small cost can still matter when the edge before costs is small:
| Variant | Gross R | Net R | Cost per trade | Gross per trade | Share of the gross taken by costs |
|---|---|---|---|---|---|
| M15-L-N | +139.4 R | +110.5 R | 0.017 R | +0.08 R | 21% |
| M15-L-T2 | +32.0 R | +3.1 R | 0.017 R | +0.02 R | 90% |
| M15-LS-N | +220.3 R | +164.6 R | 0.017 R | +0.07 R | 25% |
| M15-LS-T2 | +151.2 R | +95.5 R | 0.017 R | +0.05 R | 37% |
| M5-L-N | +188.0 R | +43.9 R | 0.026 R | +0.03 R | 77% |
| M5-L-T2 | +54.5 R | -89.6 R | 0.026 R | +0.01 R | 264% |
| M5-LS-N | +200.0 R | -79.0 R | 0.026 R | +0.02 R | 140% |
| M5-LS-T2 | +19.8 R | -259.2 R | 0.026 R | 0.00 R | 1410% |
On 15-minute bars costs took 21% to 37% of the gross profit of the three variants that beat the control; on 5-minute bars they took 77% of it for the long-only version with no stop and more than all of it for the other three.
07Longs, shorts and exits
| Variant | Long side, net R | Short side, net R | How the trades ended | Average minutes held |
|---|---|---|---|---|
| M15-L-N | +110.5 R | +0.0 R | broken alignment 980 · stop 0 · target 0 · 16:00 725 | 122 |
| M15-L-T2 | +3.1 R | +0.0 R | broken alignment 433 · stop 546 · target 252 · 16:00 474 | 83 |
| M15-LS-N | +110.5 R | +54.0 R | broken alignment 2,029 · stop 0 · target 0 · 16:00 1,312 | 117 |
| M15-LS-T2 | +3.1 R | +92.4 R | broken alignment 887 · stop 1,035 · target 592 · 16:00 827 | 75 |
| M5-L-N | +43.9 R | +0.0 R | broken alignment 4,677 · stop 0 · target 0 · 16:00 799 | 51 |
| M5-L-T2 | -89.6 R | +0.0 R | broken alignment 2,835 · stop 1,282 · target 900 · 16:00 459 | 37 |
| M5-LS-N | +43.9 R | -122.9 R | broken alignment 9,113 · stop 0 · target 0 · 16:00 1,505 | 48 |
| M5-LS-T2 | -89.6 R | -169.6 R | broken alignment 5,300 · stop 2,564 · target 1,911 · 16:00 843 | 33 |
08Is it the signal or the market?
The benchmark is a circularly shifted state-series control: the alignment series (bull, bear or none, bar by bar) is shifted by a random offset of at least 5% of its length, so the same episodes fall on other dates, and the same rules (entries only on a new alignment inside the session window, the same exits) and costs are applied to the real prices, with R recomputed at the shifted signal time. 500 runs with fixed seeds; the bar is the 95th percentile of the average net R per trade.
| Variant | Trades | Real average per trade | Control median | Control 5th to 95th | Percentile (95 needed) |
|---|---|---|---|---|---|
| M15-L-N | 1,705 | +0.06 R | +0.01 R | -0.05 R to +0.05 R | 98.6 |
| M15-L-T2 | 1,705 | 0.00 R | +0.01 R | -0.03 R to +0.04 R | 42.2 |
| M15-LS-N | 3,341 | +0.05 R | -0.01 R | -0.06 R to +0.02 R | 99.8 |
| M15-LS-T2 | 3,341 | +0.03 R | -0.01 R | -0.04 R to +0.01 R | 99.6 |
| M5-L-N | 5,476 | +0.01 R | -0.01 R | -0.03 R to +0.02 R | 85.0 |
| M5-L-T2 | 5,476 | -0.02 R | -0.01 R | -0.03 R to +0.01 R | 38.8 |
| M5-LS-N | 10,618 | -0.01 R | -0.02 R | -0.05 R to 0.00 R | 90.0 |
| M5-LS-T2 | 10,618 | -0.02 R | -0.02 R | -0.04 R to -0.01 R | 51.4 |
On 15-minute bars three of the four variants beat the control: M15-L-N (98.6), M15-LS-N (99.8), M15-LS-T2 (99.6). The long-only version with a stop and a target did not (42.2). No 5-minute variant did.
09The gates
| Variant | Trades | 1. PF ≥ 1.2 in validation | 2. ≥ 50 trades in each period | 3. t ≥ 2.5 on development | 4. Above the 95th percentile of the shifted-state control | 5. Positive without the 10 best trades | 6. Holdout net positive (already used) |
|---|---|---|---|---|---|---|---|
| M15-L-N | 1,705 | fail | pass | fail | pass | pass | pass |
| M15-L-T2 | 1,705 | fail | pass | fail | fail | fail | fail |
| M15-LS-N | 3,341 | fail | pass | fail | pass | pass | pass |
| M15-LS-T2 | 3,341 | fail | pass | fail | pass | pass | fail |
| M5-L-N | 5,476 | fail | pass | fail | fail | fail | fail |
| M5-L-T2 | 5,476 | fail | pass | fail | fail | fail | fail |
| M5-LS-N | 10,618 | fail | pass | fail | fail | fail | fail |
| M5-LS-T2 | 10,618 | fail | pass | fail | fail | fail | fail |
10Verdict by variant
| Variant | Cause | Gates failed | Verdict |
|---|---|---|---|
| M15-L-N | No proven edge | 1, 3 | Buried |
| M15-L-T2 | No proven edge | 1, 3, 4, 5, 6 | Buried |
| M15-LS-N | No proven edge | 1, 3 | Buried |
| M15-LS-T2 | No proven edge | 1, 3, 6 | Buried |
| M5-L-N | No proven edge | 1, 3, 4, 5, 6 | Buried |
| M5-L-T2 | Costs | 1, 3, 4, 5, 6 | Buried |
| M5-LS-N | Costs | 1, 3, 4, 5, 6 | Buried |
| M5-LS-T2 | Costs | 1, 3, 4, 5, 6 | Buried |
15-minute bars: three variants beat the control and were positive in net R in every year but 2025, but every one failed the development t-statistic (1.67, 0.23, 1.61, 1.33) and the validation profit factor (1.09, 0.99, 1.15, 1.16). We treat the 15-minute ribbon as a candidate for a check on new data, with the rules unchanged; it is not a proven edge, and the historical periods cannot be used again for that check. The long-and-short version with no stop is being tested forward: protocol and journal. 5-minute bars: the variants tested did not show an edge under these conditions.
Not tested: other sessions, other averages, other timeframes, filters, other markets, live fills.
TWhat this shows, and what to take into your own tests
What the results show
- None of the 8 variants passed every gate. The highest development t-statistic was 1.67 (2.5 needed) and no variant reached a validation profit factor of 1.2.
- On 15-minute bars three of the four variants beat the matched control (percentiles 98.6, 99.8, 99.6), and those three were positive in net R in every calendar year except 2025. The long-only version with a stop and a target did not beat the control.
- On 5-minute bars the variants tested did not show an edge under these conditions: none beat the control, and costs took between 77% and more than all of the gross profit.
- Unlike our earlier trend tests, the short side made money on 15-minute bars (+54 R in the long-and-short version with no stop).
What remains unknown
- Whether the 15-minute result holds on data we have not used: every period here was already used by an earlier test on this NQ file.
- Other sessions, other periods of the averages, other markets, and filters. We tested one ribbon, one session, two timeframes.
- Live fills on fast moves at the open: the backtest fills at the next minute's open plus one tick.
Why nothing passed
The 15-minute edge is small next to the noise: about +0.05 R a trade for the long-and-short version with no stop, a development t-statistic of 1.61 and a validation profit factor of 1.15. On 5-minute bars the alignment flips about three times as often, each trade earns less before costs, and costs that are small in R take most or all of it.
What you can apply to your own tests
- Compare costs with the gross edge, not with the stop size: a cost of 0.03 R a trade can take three quarters of a small edge.
- Report results in the unit the gates use and in money: a positive R total can be a negative dollar total when R varies from trade to trade.
- A result that beats a control but fails the t-statistic is a candidate, not an edge. Test it on new data with the rules unchanged.
- Check the faster timeframe last: here it was the one that failed.
A note on the numbers: drawdown figures are measured on closed trades unless a table says it includes open losses. Open losses inside a trade are not counted in a closed-trade drawdown, so real account risk is higher, especially for systems with no stop. Backtests are not live trading.
FAQCommon questions
Does the 5 8 13 EMA ribbon strategy work?
Not proven in our test. On NQ 15-minute bars the long-and-short version with no stop made +165 R after costs and beat a matched control (percentile 99.8), but its development t-statistic was 1.61 (2.5 needed) and its validation profit factor 1.15 (1.2 needed).
Is the EMA ribbon better on the 5-minute or the 15-minute chart?
The 15-minute chart in this test. On 5-minute bars none of the four variants beat the control and costs took most or all of the gross profit; on 15-minute bars three of four beat the control.
Should you use a stop loss with the EMA ribbon?
In this test the stop and 2 R target did not help the long-only 15-minute version: +3 R against +111 R without them, on the same entries.
How was the EMA ribbon tested?
On NQ futures from 2020 to 2026, entries from 09:30 and every position closed by 16:00 New York, with rules written and dated before the data was run, costs included on every trade, results split into development, validation and holdout periods, a random-entry control as the benchmark, and every variant reported. The historical periods had been used by an earlier test, which the post states. Read the protocol.
11Check our arithmetic
rb_spec.md
rb_lib.js · rb_run.js · rb_selftest.js · em_lib.js · gh_lib.js · ma_lib.js · control_audit_lib.js · rsi2_protocol.js
rb_selftest_result.txt · rb_results.txt · rb_summary.json
15-minute · 5-minute
data_manifest.md · data_holes.json · hole_sensitivity.txt
Code provenance: our own code, written from the standard definitions of the exponential moving average and of the ATR. No third-party source code is used or published.
12Data notes
The NQ file is NinjaTrader's back-adjusted continuous series (hashes in data_manifest.md): results in R and dollars are right, older prices are not the prices that traded. It has known holes (listed in data_holes.json), among them a whole session on 23 January 2026 and most of 29 August 2025. Removing the trades that cross the known holes does not change the verdicts in this check; because every position is closed the same day, only 8 trade-hole overlaps occur across the 8 variants.
| Variant | Trades | Across a hole | Verdict |
|---|---|---|---|
| M5-L-N | 5,476 | 1 | Buried → Buried |
| M5-L-T2 | 5,476 | 1 | Buried → Buried |
| M5-LS-N | 10,618 | 2 | Buried → Buried |
| M5-LS-T2 | 10,618 | 2 | Buried → Buried |
| M15-L-N | 1,705 | 0 | Buried → Buried |
| M15-L-T2 | 1,705 | 0 | Buried → Buried |
| M15-LS-N | 3,341 | 1 | Buried → Buried |
| M15-LS-T2 | 3,341 | 1 | Buried → Buried |
13Corrections
14 Oct 2026, display only: values that round to zero were shown with a sign (“-0.00 R” or “+0.00 R”); they are now shown as 0.00 R. No number changed. 9 Oct 2026: the page first published on 8 October showed the results from before a bug fix that had been made before publication: the forced exit had used the last bar of the day before 16:00, so an afternoon data hole counted as the session close; it now uses the exchange calendar. Four 5-minute trades changed, which moves the 5-minute figures slightly (for example M5-L-T2 from -89 R to -90 R); no 15-minute figure, gate or verdict changed (see the specification). The page now shows the corrected run. 9 Oct 2026: added the link to the forward test of RB-M15-LS-N, whose protocol was frozen that day. No result changed. 22 Oct 2026, navigation: added a link to the new guide comparing trading costs across all our tests. No result changed. 22 Oct 2026, navigation: added a link to the new guide comparing trend following and mean reversion across all our tests. No result changed. 22 Oct 2026, navigation: added a link to the new guide comparing versions with and without a stop loss across our tests. No result changed.
+More tests and guides
- Ema 9 21 crossover backtest
- Macd crossover strategy backtest
- Supertrend indicator backtest
- Ema 9 20 crossover backtest
- Did the stop loss help? This test next to the other with-and-without pairs
- Trend following vs mean reversion: this test next to the others of its style
- Free prop firm challenge calculator
- What all the backtests found so far
- The backtesting protocol
- How to backtest a trading strategy without fooling yourself
- Backtesting glossary