WaveTrend engine self-test 2026-10-16T06:06:59.814Z [PASS] EMA by hand: alpha 2/3, seeded with the first value (1, 1.6667, 2.5556) [PASS] WaveTrend by hand on six bars: AP, ESA, D, CI (0 while D is 0), WT1 and WT2 = SMA4(WT1) [PASS] cross up when WT1 was at or below WT2 and is now above (equal counts as at or below) [PASS] buy signal: a cross up with WT2 at or below -53; a cross up above -53 is not a signal [PASS] cross down and sell signal: a cross down with WT2 at or above +53 [PASS] no signal before the warm-up [PASS] exit X is any opposite cross; exit R only the opposite signal [PASS] long only ignores sell signals as entries; long and short takes them [PASS] synthetic WT-LS-X: engine and re-implementation agree trade by trade: 173 vs 173, 0 differences [PASS] synthetic WT-L-X: engine and re-implementation agree trade by trade: 86 vs 86, 0 differences [PASS] synthetic WT-LS-R: engine and re-implementation agree trade by trade: 131 vs 131, 0 differences [PASS] synthetic WT-L-R: engine and re-implementation agree trade by trade: 65 vs 65, 0 differences [PASS] entry at the open of the minute after the signal bar, on a buy or sell signal at or after bar 500 [PASS] exit X: out at the open of the minute after the first opposite cross [PASS] smooth waves WT-LS-X: engine and re-implementation agree trade by trade (flips included): 95 vs 95 [PASS] long and short, exit X: a flip exactly when the opposite cross is also a signal, otherwise flat: 94 flips, 172 flat exits, 0 mismatches [PASS] long and short, exit R: always in the market after the first signal (each trade starts where the previous ends, the opposite way) [PASS] long only never goes short; long and short does [PASS] one position at a time: no trade starts before the previous one ends [PASS] result in R after $0.30 of cost; R = 1.5 x ATR(14) at the signal bar; a flip pays its own round trip [PASS] financing scenarios: A charges 3% a year of the entry price per day held, B the recorded swap per night [PASS] synthetic: the control at offset 0 reproduces the real trades, flips included: 173 of 173 real data: 7067434 minutes, 129857 one-hour bars, 2004-06-11 00:19 .. 2026-10-07 16:57 New York [PASS] real data: WT1 and WT2 equal a naive recomputation (every 173rd bar): 0 differences [PASS] WT-LS-X: engine and independent re-implementation agree trade by trade: 3441 vs 3441 trades, 0 differences [PASS] WT-LS-X: control at offset 0 reproduces the real trades: 3441 of 3441, 0 differences [PASS] WT-L-X: engine and independent re-implementation agree trade by trade: 1524 vs 1524 trades, 0 differences [PASS] WT-L-X: control at offset 0 reproduces the real trades: 1524 of 1524, 0 differences [PASS] WT-LS-R: engine and independent re-implementation agree trade by trade: 986 vs 986 trades, 0 differences [PASS] WT-LS-R: control at offset 0 reproduces the real trades: 986 of 986, 0 differences [PASS] WT-L-R: engine and independent re-implementation agree trade by trade: 493 vs 493 trades, 0 differences [PASS] WT-L-R: control at offset 0 reproduces the real trades: 493 of 493, 0 differences PASSED