round 7: bare ta.vwap is the VWAP of hlc3; one TA site per read, evaluator-local inside request.security - #122
Merged
Merged
Conversation
…e per read -- inside request.security it is the evaluator's own member, not the chart's (round 7, r7-ltf-lookahead) Pine v6 defines the ``ta.vwap`` variable as the volume-weighted average of hlc3; the generated code fed the bar's CLOSE to it, on the chart (visit_expr.py bare-property emission) and in the historical precalculation loop and every request.security() context (the analyzer's default source for the synthetic no-arg call). TradingView's own read equals hlc3 on a daily bar (lab tv notrade-session-vwap-f1d, NYSE:F 1D 2025-07-01..08-31, 42/42 bars, 2026-09-05, ledger 2026-09-05 05:49) where the engine read the close: on therealbouga-apex-mtf-index-model F@1D ``close < vwap`` / ``close > vwap`` can never hold against the bar's own close, 0 engine trades vs TV's 9 on every candidate since round 5 (spark trace 2026-09-05: vwap == close on every daily bar, bias / inSession / volOk / ema all as TV's on the 07-16 signal bar). And the property read was not bound to its own site: the analyzer keyed the synthetic call-site on a FuncCall node nobody else held, so the codegen resolved every bare ``ta.vwap`` to the FIRST live ``_ta_vwap_`` member. Inside request.security() that is the CHART's member, lowered with ``history_advances_new_bar()`` and advanced by the chart bar and by every requested sub-bar (nightowlxtrader-azt F@1D: ``vwap5 = request.security( tickerid, timeframe.period, ta.vwap)`` and vwap15 shared the chart's ``_ta_vwap_1``); a second top-level read shared the first read's member. Now the site is keyed on the MemberAccess node it came from: the chart emission binds a read to its own site first (the first-live-site scan remains the fallback), and a bare ``ta.vwap`` inside request.security() is that evaluator's ``_sec<id>__ta_vwap_<n>`` member, advanced by security_series_slot_is_new and fed the requested bar's hlc3, exactly as the explicit ``ta.vwap(hlc3)`` form already was. The default source of the synthetic call is ``hlc3`` (an Identifier, so every emission path lowers it as it lowers the explicit form). ``ta.vwap(source)``, the bands form and the symbol-clock anchor tail are untouched. tests/test_vwap_property_source.py: hlc3 on the chart read and the precalc loop, property == explicit hlc3 call, two reads are two sites each advanced once, the security-context read binds to its own member (no chart member, no chart tick rule, no current_bar_) in the "D" and the timeframe.period shapes. test_anchor_vwap.py / test_vwap_tuple_unpack.py updated from close to hlc3. Full suite green. Expected to move: therealbouga-apex-mtf-index-model F@1D and nightowlxtrader-azt F@1D (with the engine's round-7 branch), and every probe reading the bare ``ta.vwap`` on an intraday lane -- to be measured by experiment before any gate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6to1XhgQe3S2QsE9Fhq1M
… (round 7, r7-ltf-lookahead) Guard for ea90029: van007trader-vwap-deviation-score-dyna computes ``float vwap = sumV > 0 ? sumPV / sumV : na`` from its session accumulators and reads ``close - vwap``; the property rule (hlc3, own site) must not touch it -- ea90029 emits byte-identical C++ for the script (2026-09-05), and its round-7 engine-c regression (100 -> 52.5 on ETH) was the engine's ta.crossover na handling (pineforge-engine 48993dc), not this codegen. No codegen change. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oh2BTrHLUSbV1C5JCmrn4
luisleo526
force-pushed
the
round7/candidate
branch
from
September 5, 2026 07:55
60b1857 to
65e7fd0
Compare
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.
Round-7 codegen candidate
60b1857, gated PASS together with enginef68baed(composite; pr-gate verdictverdict-f68baed9392d-60b18571d966-af72fb6d0479, hard 0 regressions, target +10/−0).Pinned on TradingView (NYSE:F 1D tape, 42/42): the bare
ta.vwapproperty is the VWAP of hlc3, not close; a bareta.vwapread insiderequest.securityis the evaluator's own member, not the chart's. A script's ownvwapvariable is never the property.Tests: pytest green (tests/test_vwap_property_source.py + updated).
🤖 Generated with Claude Code
https://claude.ai/code/session_017CWQz8VbJfNdTBt3DYkk3p