Feature/go runner error handling#4
Open
bvasilenko wants to merge 20 commits into
Open
Conversation
… configOverride/index-bak.html/TradeTableRenderer dead code, fix currency sign ordering and empty indicator pane rendering, and node:test marker regression suite
…derer, fix dead profitClass ternary, and node:test renderer/transformer regression suites
…aggable pane resize handles with PaneResizeCalculator/Handle/Controller, sort toggle and trade-pair sub-row ordering, extract CSS design tokens to tokens.css/styles.css with zero hardcoded literals, fix table hover/muted-text/focus-visible, delete _setupEventListeners leak via WindowResizeHandler, and node:test regression suites for all new modules
…nd Pine v5 with all-7-days default via codegen version threading, add strategy.risk.allow_entry_in direction filter, fix pyramiding cap so N means N concurrent same-side trades, fix intrabar stop-over-limit fill priority so stop wins when both breach same bar, add STDEV TV-epsilon precision, generalize security TA inputs from identifier-only to any expression across 10 state managers, refactor pivot/valuewhen into ForwardSeriesBuffer with nested-TA-call precomputer for Hull-style HMA, add ta.pivot_point_levels and Identity/Transformed/Range security bar mapping, regenerate BB7/BB9/Aostoch/Hull/BB-RSI/UtPlus goldens to TradingView Strategy Tester output, plus regression suites for every change
…YS=23456 (weekdays) versus v5 all-7-days, decompose session into timeRange and weekdayMask, fix calendar millisecond/second mismatch, replace silent NaN stubs with featuregap recording, and add BB7 phantom-bar, direction-trace, and Pine-version session ratchets
…ar timestamp in seconds so `year()`/`month()`/`hour()` and other calendar functions return correct values, unify the three codegen paths under one shared millisecond expression, and add a three-form end-to-end ratchet plus table-driven unit tests
… bar stream by adding a `SessionWindow{07:00,23:50}` to the regular MOEX calendar with a `DefaultReferenceSession(MOEX)=Regular` auto-default, removing the bar 4521 phantom UtPlus entry, regenerating `ut-plus-sberp-1h.json` from 688 to 650 trades, and adding ratchet tests guarding the filter against regression
…ts, with tests that fail loudly when parity breaks
…the updated value (arrow-if dual-storage), fixing max.pine getMA returning 0 and yielding 62 SBERP-1h trades; chart-only label/security calls stubbed so they no longer abort the run, plus negative-defval inputs, MatchSize per-trade parity assertions, top10 stale-skip guard, version-threaded time() extraction, and chart-UI toggle aria-pressed state
…pts numeric timeframe tokens like as real periods reused from same-resolution data, and resolves string variables — but the ticker-string codegen emits a symbol name declared in the wrong scope, so zigzag generates Go that does not compile; max stays end-to-end with its 62-trade golden
… symbol's real trading-day session open (MOEX, NYSE, or any exchange's observed first bar) instead of UTC midnight, so coarser-secondary `security()` values gate on the correct bar; zigzag compiles and runs via package-scope `syminfo_tickerid` and same-resolution fixture reuse; end-to-end witness on a compiled AAPL binary is not yet present
…y symbol's own exchange session-open boundary instead of UTC midnight, so a MOEX-primary strategy reading an NYSE secondary anchors that secondary to its real trading-day open even when the secondary fixture declares only an exchange and no timezone, proven by a compiled-binary cross-exchange witness.
…lues stay correct across multi-bar secondary series; eliminate silent strategy.Long direction fallback so named-argument shorts no longer reverse to long; de-skip Supertrend reversal test and assert equity against each strategy's own declared initial capital plus open-position unrealized P&L
…lace the greedy trade matcher with maximum-cardinality bipartite matching so divergence is never overstated; and document via compiled-binary tests that zigzag and moon cannot reach TV parity
…ment fixture whose bar count is below its in-window reference trade count, whose flat O=H=L=C fraction exceeds 5% for a strategy proven sensitive to flat bars, whose cross-symbol family shares identical OHLCV content, or whose price scale diverges from the reference, and tighten the TV-only discrepancy cap from 5 to 4 with the one pre-existing exception marked as operator-approved
…sion normalization Remove the escalation flags that had forced three over-cap TV-alignment cases green. Hull, UtPlus, and Alpha on the real 5.5-year MOEX SBERP-1h fixture now report their true divergence (Hull runner-only=6/tv-only=17; UtPlus runner-only=6 with export-horizon=12; Alpha 4/4). The absolute policy caps (runner-only<=2, tv-only<=4, time<=2h, price<=2.00) are retained as the correctness standard; no rate-floor or scaled tolerance is introduced. The three over-cap strategies remain wired and are reported over cap until their behavioral root cause is fixed. Land the MOEX WeekSchedule reference-session model: user-facing and generated paths normalize strategy-visible bars through NormalizeBarsWithMetadataE (strict, exit-on-error); SBERP/CNRU fixture metadata gains explicit openDates; goldens regenerated against the normalized bar stream; fixture-quality preflight and exemption-budget ratchets bound the FixtureEndOpen/FixtureStartWarmup/ ExportHorizon levers so tolerance cannot silently absorb genuine divergence. Golden and data mutation is operator-authorized.
…session-open anchors Extract the four-case order-execution switch shared by OnBarUpdate (open-price fills) and OnBarClose (close-price fills) into one dispatchOrder method with an explicit fill time, removing a ~28-line duplication and a stored-field entry-time trap. Behavior is unchanged: the generator passes the same bar time to both paths, verified against the full golden suite (moon uses process_orders_on_close). Make runtime/calendar the single source of Pine timestamp() layout parsing: add ParsePineTimestampMillisUTC over the shared dateFormats table (extended with the minute-precision layouts the codegen extractor previously carried in a separate table) and have the input.int/input.time constant folder call it instead of a private duplicate. The compile-time fold remains UTC; a timezone-sensitive default is not emitted by any current strategy and is documented as requiring runtime evaluation via TimestampFromString for full timezone fidelity. Add a ratchet pinning each known exchange's session-open minute (MOEX 07:00, NYSE 09:30, Binance 00:00) to its reference open, so a curated-table drift fails loudly rather than silently mis-tiling multi-hour security() grids after the known-exchange observation fallback was removed. Compute the fixture candidate path list once in readFixture. No golden or trade output changes; the only failing test remains the by-design policy-cap check on the three known-divergent strategies.
… casting Pine casts a fractional wma length to int by truncation, so a call like wma(src, 55/2) uses period 27 for both the term count and the triangular weights. The inline wma generator truncated only the loop bound while using the raw float length (27.5) in the weight, offsetting every weight by the fractional part. Use the truncated int period for the weight base too. No current golden or TV-alignment output changes: existing fractional-length wma strategies are crossover-based, where the near-uniform level offset cancels in the signal. This prevents divergence for any level-sensitive fractional-length wma.
The inline WMA generator now uses the truncated integer period for the weight base (float64(int(period))) so fractional lengths like wma(src, 55/2) match TradingView. The type-safe-weight test still asserted the prior float64(period) form and had been left failing. Update its expected patterns to the int- truncated form; the type-safety intent (float64 subtraction, never int-domain subtraction) is preserved by the unchanged forbidden-pattern assertions.
…ompilable Go array.new<line> and the label/box/table/linefill forms (generic and underscore) declared their variable series as <name>ArraySeries, but the cross-bar var carry-forward referenced the scalar <name>Series, producing uncompilable Go from an undefined series. Route the carry-forward through the variable's real series suffix (ArraySeries or StringArraySeries, resolved from the array variable registry), and add the drawing element types to the generic-syntax rewrite so array.new<line> resolves to array.new_line. Display-only drawing arrays now compile and run as no-ops, so the runner swallows the construct rather than failing to build. Verified across codegen unit tests, golden, and the full suite with no trade output change.
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.
Acceptance Criteria / QA
hull,ut+,alpha,ann,moon,ut,aostoch, plus the two real-codegen-gap strategies once their fixes land, all carry a TV reference capture and a passing strict alignment ratchet within policy capsultimais annotated in the regression suite as a known by-design no-trade case so the "0 trades" observation does not regress into a phantom defect.pine.skipsidecars -- the stale-skip guard runs green and thetop10/directory contains no.pine.skipfor any strategy that executes end-to-end