Intraday trend pullback engine self-test 2026-10-14T08:20:43.497Z [PASS] EMA(3) of 1..5: NaN, NaN, then seeded at 2 (simple average), 3, 4: NaN, NaN, 2, 3, 4 [PASS] bars: 15-minute and 1-hour counts, close stamps on the UTC clock: 1040 / 260 [PASS] trend: a 15-minute bar uses the 1-hour bar closed at or before its own close (none before EMA200 exists, up from the bar closing with hour 200): 0 1 [PASS] target touched in minute 3: exit at the target: {"i":3,"exit":102,"reason":"target"} [PASS] a minute touching both the stop and the target: the stop (cautious): {"i":2,"exit":99,"reason":"stop"} [PASS] entry minute: only the stop is checked (stopped although it also reached the target): {"i":0,"exit":99,"reason":"stop"} [PASS] a stop gapped through fills at the open (98.4): {"i":3,"exit":98.4,"reason":"stop"} [PASS] a target gapped through fills at the open (102.6, better than the target): {"i":3,"exit":102.6,"reason":"target"} [PASS] no level touched: closed at the close of the 23:59 minute: end of day at minute 119 [PASS] funding: 07:00 to 17:00 crosses 08:00 and 16:00 = 2; entry at 08:00 exactly does not pay 08:00; 17:00 to 07:00 next day = 0 [PASS] synthetic TP-LS: engine and re-implementation agree trade by trade: 135 vs 135 trades, 0 differences [PASS] synthetic TP-LS: stop five-bar extreme -/+ 1 tick, target 2R, entry at the next minute, result in % and R after 0.05% a fill: 0 of 135 [PASS] synthetic TP-L: engine and re-implementation agree trade by trade: 103 vs 103 trades, 0 differences [PASS] synthetic TP-L: stop five-bar extreme -/+ 1 tick, target 2R, entry at the next minute, result in % and R after 0.05% a fill: 0 of 103 [PASS] one position at a time: every signal comes from a bar after the bar of the previous exit: 0 real data: 4789278 minutes, 319294 15-minute bars, 79837 1-hour bars, 2017-08-17 04:01 .. 2026-10-01 00:00 (stamps at the minute's close) [PASS] 15-minute bars equal a naive grouping by UTC time: 319294 bars, 0 differences [PASS] 60-minute bars equal a naive grouping by UTC time: 79837 bars, 0 differences [PASS] trend of every 97th 15-minute bar equals a brute-force search for the last closed hour: 0 differences [PASS] no signal before 2017-09-15 00:00 UTC [PASS] TP-LS: engine and independent re-implementation agree trade by trade on the real data: 10526 vs 10526 trades, 0 differences [PASS] TP-LS: control at offset 0 reproduces the real trades: 10526 of 10526, 0 differences [PASS] TP-L: engine and independent re-implementation agree trade by trade on the real data: 5555 vs 5555 trades, 0 differences [PASS] TP-L: control at offset 0 reproduces the real trades: 5555 of 5555, 0 differences PASSED