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 plain nan, 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 / 8 still picks the int implementation (PYNE_NO_TYPE_PIN=1 disables)
  • 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=1 gate 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_interpolation follow TradingView’s na rank order; ta.median returns the mean of the two middles
  • list/str/tuple indexes and range() bounds written with a Pine int are truncated by the loader; lst[int(n)] works
  • strategy.closedtrades/opentrades accept an na trade number; box/label/line coordinates 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_tag persisted on envelope anchors

Performance

  • Series subscripts 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