EMA 9/21 engine self-test. Run 2026-10-08T15:22:11.406Z PASS the variant list is narrowed to the four tested variants (L-N, LS-N, L-T2, LS-T2) - GH-L-N, GH-L-T2, GH-LS-N, GH-LS-T2 PASS hand case: EMA(2) = 10, 10, 11.3333, 13.1111, 12.3704 and EMA(4) = 10.5, 11.9, 11.94, 10.364 at the bars where they start PASS hand case: EMA(2) - EMA(4) is +0.83, +1.21, +0.43, -0.91, -2.00, -0.62, +0.89, +2.02 from bar 3, so one death cross at bar 6 and one golden cross at bar 9, none at the first bar where both exist PASS settings: fast 9, slow 21, cut 2026-09-25 17:00 New York, periods as specified PASS cost per trade: ES $30.76, NQ $15.76, GC $25.76 (commission 5.76 + one tick on each of two fills) PASS cost per roll equals the cost per trade in every market PASS GC roll dates: 34, strictly increasing, 2020-01-29 first and 2026-07-24 last, 17:00 New York PASS ES and NQ use the engine's quarterly rolls (no market-specific list) Real data (no results printed): PASS ES: data cut - the last 1-minute bar is at or before 2026-09-25 17:00 and the first is 2020-01-01 18:01 - 2020-01-01 18:01 .. 2026-09-25 16:59, 2378027 minute bars PASS ES: hourly bars strictly increasing in time - 39787 hourly bars PASS ES: the engine's EMA(9) and EMA(21) of the hourly closes match a naive recomputation to 1e-9 - max diff 5.5e-12 PASS ES: the engine's cross signals equal the naive signals bar by bar - 1674 signals (837 golden, 837 death) PASS ES EM-L-N: engine = independent reference (this market's costs and roll dates), trade by trade PASS ES EM-L-N: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS ES EM-L-T2: engine = independent reference (this market's costs and roll dates), trade by trade PASS ES EM-L-T2: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS ES EM-LS-N: engine = independent reference (this market's costs and roll dates), trade by trade PASS ES EM-LS-N: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS ES EM-LS-T2: engine = independent reference (this market's costs and roll dates), trade by trade PASS ES EM-LS-T2: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS ES: the test is not vacuous - some no-stop trades are held through at least one roll (so the roll cost and dates are exercised) - 13 trade(s) PASS ES: the shifted-state control with shift 0 reproduces the real signals PASS ES: the control machinery runs on the real bars for the four variants (3 smoke runs) PASS NQ: data cut - the last 1-minute bar is at or before 2026-09-25 17:00 and the first is 2020-01-01 18:01 - 2020-01-01 18:01 .. 2026-09-25 17:00, 2373779 minute bars PASS NQ: hourly bars strictly increasing in time - 39741 hourly bars PASS NQ: the engine's EMA(9) and EMA(21) of the hourly closes match a naive recomputation to 1e-9 - max diff 2.5e-11 PASS NQ: the engine's cross signals equal the naive signals bar by bar - 1630 signals (815 golden, 815 death) PASS NQ EM-L-N: engine = independent reference (this market's costs and roll dates), trade by trade PASS NQ EM-L-N: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS NQ EM-L-T2: engine = independent reference (this market's costs and roll dates), trade by trade PASS NQ EM-L-T2: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS NQ EM-LS-N: engine = independent reference (this market's costs and roll dates), trade by trade PASS NQ EM-LS-N: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS NQ EM-LS-T2: engine = independent reference (this market's costs and roll dates), trade by trade PASS NQ EM-LS-T2: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS NQ: the test is not vacuous - some no-stop trades are held through at least one roll (so the roll cost and dates are exercised) - 12 trade(s) PASS NQ: the shifted-state control with shift 0 reproduces the real signals PASS NQ: the control machinery runs on the real bars for the four variants (3 smoke runs) PASS GC: data cut - the last 1-minute bar is at or before 2026-09-25 17:00 and the first is 2020-01-01 18:01 - 2020-01-01 18:01 .. 2026-09-25 17:00, 2373188 minute bars PASS GC: hourly bars strictly increasing in time - 39656 hourly bars PASS GC: the engine's EMA(9) and EMA(21) of the hourly closes match a naive recomputation to 1e-9 - max diff 4.5e-12 PASS GC: the engine's cross signals equal the naive signals bar by bar - 1720 signals (860 golden, 860 death) PASS GC EM-L-N: engine = independent reference (this market's costs and roll dates), trade by trade PASS GC EM-L-N: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS GC EM-L-T2: engine = independent reference (this market's costs and roll dates), trade by trade PASS GC EM-L-T2: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS GC EM-LS-N: engine = independent reference (this market's costs and roll dates), trade by trade PASS GC EM-LS-N: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS GC EM-LS-T2: engine = independent reference (this market's costs and roll dates), trade by trade PASS GC EM-LS-T2: every entry is on a signal bar in the right direction, one position at a time (a reversal closes and opens at the same open) PASS GC: the test is not vacuous - some no-stop trades are held through at least one roll (so the roll cost and dates are exercised) - 17 trade(s) PASS GC: the shifted-state control with shift 0 reproduces the real signals PASS GC: the control machinery runs on the real bars for the four variants (3 smoke runs) SELF-TEST PASSED: every check passed (11 s). em_run.js may now be pointed at the data. PASSED 2026-10-08T15:22:21.974Z