PyneCore v6.9.0 released — Pine int is now a static type over a double-only runtime,…
Features
- Every int-typed value travels as an integral
float;na(int)is a plainnan, truncation happens at the consuming slot, storage keeps the value (array.new_int(1, 7 / 4)holds 1.75) - Static Pine type inference stamps the AST; overload calls are pinned statically so
14 / 8still picks theintimplementation (PYNE_NO_TYPE_PIN=1disables) - Modules publish a type interface; cached bytecode is dependency-aware; imported user libraries are typed from their signatures
script.indicator/strategy/library(..., na_bool=True)keeps Pine v4/v5’s three-state bool; default is v6’s two-state bool- Opt-in
PYNE_EDGE_STRICT=1gate rejects constructs outside the Pyne Edge subset with one diagnostic per typing failure
Fixes
math.round(number, precision)follows the measured TradingView rule (half away from zero, exact tie on the double product, fractional precision used continuously)- Rolling
ta.percentile_nearest_rank/ta.percentile_linear_interpolationfollow TradingView’s na rank order;ta.medianreturns the mean of the two middles list/str/tupleindexes andrange()bounds written with a Pine int are truncated by the loader;lst[int(n)]worksstrategy.closedtrades/opentradesaccept annatrade number;box/label/linecoordinates normalize at the library boundary- Broker engine: no halt on read outages, teardown joins the event stream before closing resources, stale partial legs retired, venue-driven cancels honoured,
run_tagpersisted on envelope anchors
Performance
Seriessubscripts take a float offset on a single fast path (a 60% for-loop regression measured during development is gone)
Full release notes: https://github.com/PyneSys/pynecore/releases/tag/v6.9.0