Skip to content

security: intraday HTF bucket finalizes when the input bar reaches the bucket end (thin sessions) - #165

Merged
luisleo526 merged 1 commit into
mainfrom
fix/symbol-r8-ship
Aug 24, 2026
Merged

security: intraday HTF bucket finalizes when the input bar reaches the bucket end (thin sessions)#165
luisleo526 merged 1 commit into
mainfrom
fix/symbol-r8-ship

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

An intraday request.security bucket built from finer input bars (feed_ratio_mode) is finalized when the input bar's end reaches the bucket's real end — not only when the sub-bar count reaches the ratio or when the next bucket's first bar crosses the boundary (lab finding 467/472). On a thin session (a 60-minute bucket with 56 present minutes, e.g. the first hour after the forex open, or Christmas Eve) the old rule completed the bucket on the boundary bar inside the next chart bar, so security(...)[1] flipped one chart bar later than on TradingView. The round-7 session-close clip is kept (an RTH '240' bucket never reaches its real end inside the session); all completion paths are guarded so a bucket is never emitted twice, which makes the change a no-op on gap-free feeds.

Evidence: OANDA:EURUSD oscar-lab-mtf-smc-signal-v2 233/238 → 236/238 (excellent), masayanfx 313 → 318/324; every other measured tape byte-identical (EURUSD/AAPL probes, raphaeltay, ETH 5/5). ETH population 396/396, corpus 309/2/1 (promote). tests/test_htf_bucket_real_end.cpp (568 checks, incl. last-minute-missing and DST cases); ctest 142/142.

@luisleo526
luisleo526 merged commit 013228c into main Aug 24, 2026
7 checks passed
@luisleo526
luisleo526 deleted the fix/symbol-r8-ship branch August 24, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant