Quick update on our OrderFlowAi build-in-public dev diary.
The bug: For ~3 days our app delta showed the wrong sign in trending markets (e.g. app Δ+6.4K while the real market was −4.7K). Root cause: NinjaTrader fires Bid/Ask quote events before the matching Last trade event, so computing the aggressor side from a stale quote systematically inverts the classification.
The fix: We switched to a proper Lee-Ready (1991) implementation with carry-over state — primary tick-rule, fall back to last known direction on flat ticks, quote only as final tiebreaker. After the fix, app delta matched GoCharting delta (sign + roughly magnitude).
The reset: Old RL learning data was contaminated by the bug, so we wiped everything: journal, OEM decisions, RL files, even NT8.sqlite execution history (712 executions, 1,451 orders, 9,514 order updates). Full backup retained.
The new engine (v0.5.0): Phase-Aware regime detection in NY time (London / NY_Open / Midday / Closure), each phase with its own thresholds. Plus Wyckoff classification (Accumulation/Markup/Distribution/Markdown) and VPOC migration per phase as a regime signal.
First live trades after reset (~2h window): 4 trades, 2W/2L, +$760 net on ES E-mini. RL weights were empty on every entry — strategy decides without historical bias. Tonight we run the first full day analysis against this zero baseline.
Video (~12 min): https://youtu.be/K5dg61fOMq0
Happy to answer questions about the Lee-Ready implementation or the phase detection logic.
submitted by /u/OrderFlowAI to u/OrderFlowAI
[link] [comments]