session symbols: syminfo-tz session windows, symbol-clock D/W/M anchors, zero-lot orders, margin call at the open - #162
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Four generic session-symbol semantics fixes, measured on the NASDAQ:AAPL and OANDA:EURUSD 15m populations and byte-inert on BINANCE:ETHUSDT.P (24x7/UTC) — ETH scraped 396/396 and corpus 309/2/1 unchanged.
time(tf, session)/time_closesession windows read insyminfo.timezone(finding 421/436). The session-filter tz defaulted to UTC; Pine resolves it in the exchange tz. Engine side:pine_time/pine_time_closegain a trailingsyminfo_tz(default""= old behaviour; feature macroPF_PINE_TIME_HAS_SYMINFO_TZ). Codegen PR passessyminfo_.timezone.opentrades==1,position_size==0), silently blocking every later signal. TV simply does not place it.ta.vwap,timeframe.change,time('D'|'W'|'M')(finding 423/440). These keyed on UTC midnight; for OANDA:EURUSD the trading day rolls 17:00 ET and the week opens Sun 17:00 ET. New helpers (session_day_index,session_period_open_ms/close_ms) built on the security: anchor HTF aggregation on the symbol clock (syminfo.timezone + session) #159–security: session-attributed weekly/monthly period keys #161 machinery;VWAP::compute(tz,session) overloads, 7-argpine_time(macrosPF_PINE_TIME_HAS_SESSION_DAY,PF_VWAP_HAS_SESSION_ANCHOR). Semantic decisions pending a TV probe are listed in finding 440 (valid explicit session defines the day in its own tz; wrapped-session month attribution).Population evidence (lab findings 443–445; ladder-ranking harness 90fcb64): EURUSD excellent 251 → 271, e+s 327 → 347, 30 tier ups / 0 downs; AAPL excellent 210 → 235, e+s 291 → 307, 31 up / 5 down. Four-lane symbol gate PASS vs the 08-22 baseline (aapl 170 up / 19 down, eurusd 79 up / 36 down).
Tests: ctest green incl. new
test_zero_lot_entry_decline,test_session_day_anchors(23,850 checks),test_margin_call_gap_open, session_time DST cases.