Changelog
Release notes for PYNE (hoox-pyne / pynescript).
This page
Manuals
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
0.6.4 - 2026-09-14
Convert older Pine to v6 in the editor, LSP, CLI, and HTTP.
Added
- Editor Convert to Pine v6: AXIS overflow menu + command palette, VS Code
PYNE: Convert to Pine v6/ lightbulb, LSP code action, andPOST /lsp/convert. Source-level rewrite from any older version (missing pragma = v1) — colors /n/ timeframe idents,ta.*/math.*/request.*namespaces,study(→indicator(, typedinput.*(),iff/offset. Not a semantic v6 migrator.
Changed
pyne convert --to 6now runs the full v1-v5 pipeline, not only leftoverstudy(/request.*names.
0.6.3 - 2026-09-14
Hosted script runner on Flask / VPS / container, plus pyne runner CLI.
Added
- Optional Flask hosted runner (
PYNE_RUNNER=1): SQLite script registry,POST/GET/DELETE /scripts,GET/PUT /cron/jobs,POST /cron/run. Background bar-close polling is a second switch (PYNE_RUNNER_SCHEDULER=1). Docker / VPS / Cloudflare® Container pick it up via env; default remains off. - CLI
pyne runnertalks to that API:deploy,list,show,delete,tick,jobs,enable,disable(--url/PYNE_API_URL).
0.6.2 - 2026-09-12
P1p plot-parity tail on official TV builtins.
Fixed
- Interpret UDF series parameters:
s[1]inside a function now tracks the per-call-site argument stream when the caller passed a scalar (src = close; updown(src)). Official Connors RSI and the TV builtin script set are 0 MISMATCH vs compile.
0.6.1 - 2026-09-12
Correctness follow-up on 0.6.0 dual-host risk, InterpretSession, and HTF
resample, plus the session API that landed after the v0.6.0 tag.
Added
- Persistent
InterpretSession: deltaappend_bars, realtimeupdate_last_barticks, TA rollback, confirm-on-append.
Fixed
strategy.cashas a qty-type identifier now selects cash mode on both interpret and compile (string"cash"was the only working form).- Compile
begin_barreceives bar time so day-scoped fill caps and consecutive-loss days roll onRuntime.run(mode="compile"). - Pending fills are risk-gated at fill time on both brokers; covering leftover cannot reverse-open after an intraday halt.
- Session
barstateno longer leaks across appends; confirm overwrites strategy history;islastis false on a confirmed bar when more bars follow;_once_firedrolls back with the bar-open snapshot. - HTF
lookahead_onleaks each bucket's final value from the period start on historical bars (not developing-as-of-this-bar);close[1]resamples previous HTF bars (same-TF falls back to chart history); bare D/W/M buckets followtimeframe.change(Monday weeks,syminfo.timezone). - Codecov per-flag uploads set
disable_searchso reports stay isolated.
Changed
- Disk IR cache v16 (
begin_barbar time, calendarchart_timezone(),strategy.cashqty-type emit). - Docs: PyneTS as standalone package (no
pynets/submodule); retired linter codes C003/W102/W103; version stamps 0.6.1.
Security
- wrangler 4.131.0 (sharp 0.35.4, GHSA-rgj7-g3m4-5g8c).
0.6.0 - 2026-09-10
Parity increments across strategy risk, realtime scope, timeframes,
request.security barmerge, and the linter.
Added
- Strategy risk:
strategy.risk.max_intraday_loss(value, type)honors percent-of-equity vs cash on both brokers; interpret enforces intraday loss plus the day-scopedmax_intraday_filled_orderscap, with order-level fill counting on both hosts. - Realtime: intrabar rollback of the
varscope plus series currents on interpret realtime ticks (varippersists);oncefires once from confirmed state. - Timeframes:
timeframe.changeD/W/M on the exchange calendar (syminfo.timezone, UTC default; DST-aware days, Monday weeks, calendar months); compile routes calendar TFs through object mode. request.security:gaps_on/lookahead_onhonored on the HTF resample paths (bucket-start na-gaps, forming-bucket reads); presence-vs-effect policy tags (gaps_lookahead_providedvsgaps_applied/lookahead_applied).
Changed
- Docs:
onceon grammar/ASDL/builder/unparser, interpret + compile pages, compatibility, glossary, FAQ, missing-features. Version table 0.6.0. docs/known_divergences.md: F-12…F-16 closed; D-02/D-04/D-06 narrowed to their documented residuals.- Disk IR cache v14 (calendar routing changed codegen).
Removed
- Linter: retired legacy rules
C003(indentedifwithout "braces"),W102(histogram → plotcandle),W103(var int x = na→ 0); codes stay retired so history stays greppable. LSPC003noise filter removed with the rule.
[0.5.0] - 2026-09-07
Performance release across the whole stack, plus several correctness fixes surfaced by the work.
Changed
- Slotted AST nodes. ASDL generator emits
@dataclass(slots=True); the sharedASTbase carries__slots__for evaluator call-site stamps. Removes the per-node__dict__(large scripts allocate tens of thousands of nodes). Regenerate viapython src/pynescript/ast/grammar/asdl/tool/generate.py. - LSP typing latency (~3-5×).
didChangeno longer runs two full ANTLR parses (the linter accepts a pre-builttree=), and parse+lint now run debounced (250ms,PYNESCRIPT_LSP_DEBOUNCE_MS) on a worker thread so the event loop stays responsive. Semantic tokens, inlay hints, hover decl maps, and workspace/symbol results are memoized per document version; completion items, fuzzy-filter fields, and categories are cached per metadata load; references/definitions dedupe is O(1) per line. - TA incremental coverage.
ta.max/ta.min/ta.rangenow use the incremental kernels;ta.highest/ta.lowest/ta.wpr/ta.stochincremental use monotonic-deque sliding extremes (amortized O(1)/bar instead of O(period) scans);ta.rcirank computation is O(n log n) (was O(n²) per bar);ta.vwmaincremental drops its O(period) na-scan. - Per-bar
importstatements hoisted out of hot paths (+=assignment, subscript call-sites,switch, overload dispatch);_commit_unwritten_historyiterates a cachedhistory ∩ varintersection. - Parse-cache hit scrub is a specialized stack walk (was generator BFS);
Runtime._parse_scriptno longer performs a second redundant full-tree walk. - Builder: single-line token fast path skips the per-node
stop.textsubstring allocation; simple string literals skipast.literal_eval. - Backend:
/runapplies a server-side default timeout (PYNE_RUN_TIMEOUT, 30s) so pathological scripts cannot kill a gunicorn worker; PBKDF2 key hashing is LRU-cached (~50-100ms → O(1) per authenticated request); SSRF DNS verdicts are TTL-cached; optional off-thread webhook delivery (ALERT_WEBHOOK_ASYNC=1); chart renderer uses the thread-safe OO matplotlib API (pyplot globals raced under--threads 4). - OHLCV pack/list caches are bounded by tracked bars
(
PYNE_OHLCV_CACHE_MAX_BARS, default 2M), not just entry count. - Strategy
position_size/position_avg_price/closedtradesend-of-bar history is capped at 512 entries.
Fixed
- Five compiler/evaluator subtree walks used
node.__dict__.values(), which silently collected nothing on slotted nodes and broke UDFvar-local and history-series detection; traversal now goes through_fields. _as_seriessame-bar cache could false-hit on a different series (single interned-int fingerprint): fingerprint uses the two newest samples and the host clears the cache every bar.- OHLCV pack cache evicted from the list cache, so the pack cache was never bounded.
didChangewithout a priordidOpencrashed the LSP handler (now treated as an empty open); closed documents leaked into the workspace parse-error set.
0.4.4 - 2026-09-05
Added
onceconditional structure (Pine Script™, August 2026). Executes its block the first time the optional condition is true on a closed bar, then never again. Soft keyword so existingonceidentifiers still parse. Interpret honors realtime rollback (unconfirmed ticks can re-fire); compile is historical (isconfirmedalways true).
0.4.3 - 2026-09-04
Added
pynescript convert --to 5|6— source-level v5 ↔ v6 rewriter (//@version,study(→indicator(on the way to v6, baresecurity(/financial(/ … ↔request.*). Comments and string literals are left alone. Not a semantic migrator (bool-as-int,natightening).
Fixed
- Compile
plot(..., display=)bitfield is folded intoplot_attrssoplot_metacarries it (follow-up to 0.4.2). - UDF
var+ history (x[1]) is per call site; interpret no longer drops every-other-barnavs compile (e.g.moon_phases.pine). table.merge_cellsno-ops onnacoordinates instead ofint(None)on the last bar.- Remaining CodeQL: stack traces not returned in alert-forward errors; ReDoS regexes rewritten as linear scans.
Changed
- Pro API key store (breaking for SHA-256-only records): keys are
PBKDF2-HMAC-SHA256 (
v2:). JSON files keyed by the raw secret are rehashed on load. Orphaned 64-hex SHA-256 records are skipped — remint those keys. - CI: ruff E/F/W over
backend/; VS Code VSIX packaged with@vscode/vsce(@types/vscodepinned toengines.vscode1.91);download-artifact@v8; PyPI publishskip-existingso a duplicate tag run does not 400. - Dependabot weekly updates landed (Actions, docs, vscode-languageclient 10, TypeScript 7, wrangler).
0.4.2 - 2026-08-26
Fixed
- Compile
plot(..., display=)is stored onplot_attrssoplot_metaexports the display bitfield. - First CodeQL pass: errors, high, and medium alerts on the tagged tree.
0.4.1 - 2026-08-26
Fixed
- Compile
plot_metabackfills hline linestyle from__drawings.
0.4.0 - 2026-08-25
Changed
- VPS origin is Hetzner
pynescript.online(204.168.138.51) —scripts/deploy_vps.shdefaults to SSH hostpynescriptand skips AXIS dist (PWA is on Cloudflare® Pages). API-only gunicorn behind nginx;axis-pwa.serviceis optional.
[0.3.18] - 2026-08-25
Added
- AXIS contract parity:
plot_metaexports Pine visual params (offset,histbase,trackprice,join,editable,show_last) on interpret and compile hosts; omitted keys equal Pine defaults. plotcandle/plotbarexport OHLC as close-primary series plus<title>.open/.high/.lowsiblings referenced fromplot_meta(open/high/low/close), withwickcolor/bordercolor.- Drawing/table exports gain stored-but-unexported styling: box
extend/border_style/text styling, label tooltip/alignment/formatting,
polyline curved/fill_color/force_overlay, table frame_width/border_color/
border_width plus
merged_cells. - LSP builtin metadata carries canonical Pine v6 signatures for plot-family builtins.
Fixed
- Positional
plot(...)calls misread linewidth/style indices (now linewidth = 3rd arg, style = 4th per Pine v6 signature). table.clear(t, r0, c0, r1, c1)clears only the requested range;table.merge_cellsrecords ranges and exports them.- Compile-mode
plot_metano longer hardcodeslinewidth=1when source declares constant linewidth/style/offset/histbase. - Compile IR cache no longer shares entries whose titles/kinds/attrs diverge (metadata bleed across sources).
- Positional wickcolor/bordercolor args on plotcandle/plotbar are captured (previously kwargs-only).
[0.3.17] - 2026-08-19
Fixed
- Compile object-mode residuals — user
round()UDF call sites pass free/chart formals; missing libraryalias.method(...)stubs arenanot PythonNone; same-aritynegate(float|bool|color)dispatches by argument type so hex colors stay off float64 series; method overloads on UDT fields (this.wins.getAvgProfit()) pick the field's type, not the outer receiver.
[0.3.16] - 2026-08-19
Fixed
- Compile object-mode corpus residuals (set06) — UDF
int m = ifstays a local (not scriptm_arr); nested UDFs still receive script-levela_arrwhen a param shadowsa; UDFvar voldoes not steal chartvol_arr(get_countsarity);Type.new()locals mark UDT returns sos.strengthis notfloat(dict); statement-formx = switchno longer emits invalidx = if;chart.point.copy/box.copyclone dicts instead oflist(None). - Numba object-mode helpers —
Noneno longer TypingErrorsnumba_max/min/absand related scalars;timestampskips a leading timezone string;valuewhenand running max/min fall back on object arrays; Pineint(na)isna(pine_int, not Pythonint(nan));ta.pivothighna lengths;ta.cumusessafe_float. - Matrix handles — UDF/
kronresults stay list-of-lists objects; builtins do notlen()a numpy scalar. - Corpus sanitize — keep trailing commas on wrapped
=>calls; tab-indented bodies after) =>; drop Hugo/markdown tails after a complete script; keep nested/* */comments; stub jinja/markdown planning docs. - Grammar —
NEWLINE+before indented=>/ if / for / while / switch bodies.
Changed
- Docs: missing-features / implementation-status / roadmap / progress report aligned with compile object-mode residual recovery (P1p plot MISMATCH tail still open).
[0.3.15] - 2026-08-19
Added
pynescript download-builtins— catalog + download TradingView® builtin Pine templates via pine-facade (--list/--yes/--limit).scripts/search_clone_pine_pool.py— search and shallow-clone GitHub Pine repos for corpus collection.cf/— Cloudflare® Containers Worker that fronts the Pro API and keeps a named instance warm.
Improved
- LSP hover — types/qualifiers (
series/float), namespaces (tainta.sma), user functions/assignments/type/enum, and longer keyword briefs. Builtin cards keep signature fence + params when metadata has them.
Fixed
- Compile set06 residuals — missing
array/map/matrixhelpers,for+continueincrement, for/while-as-expression emit, multi-value and default-onlyswitch,/* */comments, mapfor-inpairs,ta.dmiscalar assign,matrix.setexpression form,npunpack shadowing, nopythonTypingErrorobject-mode retry, tuple/UDT stores off float64 series. - Corpus sanitize — RST/Hugo/MDX chrome, mustache
{{IDENT}}, indentedstudybodies, column-1 ternary tails, torn string fixtures.
[0.3.14] - 2026-08-18
Fixed
strategy.position_avg_price— repeatingstrategy.entry("L")no longer overwrites a filled position (avg was tracking last close). Extra same-direction entries only whenpyramidingallows; interpret and compile.strategy()leverage vs margin — whenleverage=is set it wins (margins derived from it).margin_long/margin_shortonly apply when leverage is omitted. Compile broker accepts those kwargs the same way.
Changed
- Docs / comments: PYNE open-entry cap is
pyramiding + 1(TVpyramidingdefault 1 ≡ PYNE 0). Unused compile-brokerreplace_same_idkwarg removed. - Tests: leverage-vs-margin (both set), compile margin-only 5× cash sizing, same-id pyramid VWAP (third fill blocked), pending same-id limit/stop replacement; free-tier rate/slot no-ops when the switch is off.
- Free-tier
/runguards are opt-in —FREE_TIER_LIMITS(default off). Bar/script/rate/concurrency and chart/mock-onlydata_sourceapply only when set to1/true/yes/on. Production compose still enables them (FREE_TIER_LIMITS=1). Healthfeatures.free_tier_limitsreports the flag. Pro API / endpoint abstracts no longer read as always-on. - Product landing and end-user hub list
pyne optimize/POST /optimize.
[0.3.13] - 2026-08-17
Fixed
- Optimize scores broker fills (not
strategy.exitplacements); trail-only exits; warmup pairing; JSON-safe study scores. - Walk-forward train+test run cap; HTTP
min_trades=0/ 400 mapping; CLI walk-forward windows; continuous Random/TPE sampling; grid product cap. - Incremental
ta.dpo/ta.kstdispatch;timeframe.change("1M")is monthly; compile table cells/colors and deleted linefills.
[0.3.12] - 2026-08-17
Added
- Strategy hyperparameter search —
pynescript.optimize(TPE / random / grid, holdout + walk-forward) scores realRuntimestrategy events.POST /optimize(same free-tier gates as/run) andpyne optimize. Not/backtest/quick; not a Pine builtin. - Real
timeframe.changeon interpret and compile (UTC fixed-width buckets; bar 0 is a new period). - HTF
request.securityallowlist includesta.wmaandta.rma. - Incremental interpret kernels for
ta.aroon,ta.dpo,ta.donchian, andta.kst. - Dual-host plot/drawing identity: compile geometry-only AXIS export, plot_meta kinds, coordinate snapshot at create/set.
[0.3.11] - 2026-08-16
Added
- Incremental interpret
ta.nvi/ta.pviplus matching compilenumba_nvi_inc/numba_pvi_inc. - Flask
POST /runtimeout_secondsandPOST /run/batchlibraries. - Dual-host goldens: Supertrend mid±factor·ATR, trail OHLC, foreign
request.*→na, compile plot keys.
Changed
- Interpret
ta.pvt/ta.vptis cumulative (matches compile / TV). Bar 0 is0.0. pynets/submodule pin v0.2.0 (interpret + JS compile). Python Runtime remains the oracle.
Fixed
- Compile MACD signal SMA-seeds the MACD line; OBV skips the first close change.
- Compile
ta.ao/ta.aroonkernels (were all-na). - Compile foreign
request.securitytuple unpack no longer invents chart close. - Compile titled
bgcolor/ emptyplot(..., title="")keys match interpret (disk IR v10). - Compile
strategy.exitkeeps the Pine exit id for trail events.
[0.3.10] - 2026-08-16
Added
- Incremental interpret kernels for
ta.obv,ta.wad/wvad,ta.cmf, andta.klinger(PYNE_TA_INCREMENTAL).
Changed
- Runtime interpret hot path (Round 9): direct Assign/
plot/Call dispatch, skip unused derived OHLCV series, plot bar-reuse. Same-machine bench @ 2000 bars: minimal 2.7×,ta_sma2.0×,ta_combo1.45×.PYNE_SERIES_RINGstill default off. ta.vwap()with no source still updateshlc3when that identifier is absent from the script.
[0.3.9] - 2026-08-16
Added
FunctionDef.returns— UDF/method return types survive parse → unparse (int ilog2(...)).- Incremental
ta.median/ta.cmoNumba kernels; statementhline/fillstay nopython with synthesized drawings. - Thread-local ANTLR lexer/parser reuse (warm SLL DFA across distinct sources).
- LSP Docker image
ghcr.io/hoox-sh/pyne/lsp(stdiopyne-lsp, slim[lsp]only). Published onv*tags with api/cli.
Changed
- Grammar left-factors typed names; bare
x =isAssign,=reassignment only on attribute/subscript. - Evaluator:
varhistory carry at bar start; series maxlen matches host ≥1000;_pine_site_idfor UDF/call-expr history. - pyne-vscode publisher namespace is
hoox-sh(extension idhoox-sh.pyne).
Fixed
Runtime.run(mode="auto", libraries=)forwardslibrariesinto interpret fallback.- Windows CLI
--helpno longer crashes on cp1252. Open VSX unknown-publisher no longer fails Build & Release. - CORS — AXIS product Origins +
/healthfree CORS path (also in 0.3.8 notes). - Build & Release: Create Release no longer downloads Docker Buildx cache artifacts.
[0.3.8] - 2026-08-15
Added
- Compile UDT field defaults on
Type.new()(omittedbool x = falsestaysFalse;bool(np.nan)no longer trips flags). Fixes interpret↔compile071Entry plot. register_library_sourcefinalizes library exports soRuntime.run(..., libraries=)/POST /runimport ns/Lib/1actually binds members.- Supertrend first-party goldens lock the simplified mid±factor·ATR contract (interpret full/inc + Numba).
- LSP: user-enum completion/hover/outline; soft-keyword hover;
plot(ta.leaf insert; drop C001/C003 false positives.
Fixed
trail_points=0/nano longer disables a validtrail_offset(interpret + compile).- VPS deploy AXIS health probe uses
:80(not stale:8081).
Changed
- Compile disk IR cache meta version 7 → 8 (UDT defaults).
- Docs honesty: tick-offset
profit/loss, omitted bid/askna, H1 Runtime unify done.
[0.3.7] - 2026-08-15
Added
Runtime.run(..., libraries=)— optional[{namespace, name, version, source}]registered viaregister_library_sourcebefore interpret so AXISimport ns/Name/verresolves published git folders. Pro APIPOST /runaccepts the samelibrariesfield.
Changed
- Runtime hot path: skip series dual-write when
PYNE_SERIES_RING=1; tick-offset exits, incremental MA, plot pack, kernels.
Removed
- Colocated
pine-worker/TypeScript extra tool (parser/evaluator port). Lives in the siblingpine-workercheckout, not this repo.
[0.3.6] - 2026-08-13
Added
- Binary search in UDT arrays (Pine August 2026):
array.binary_search(),array.binary_search_leftmost(), andarray.binary_search_rightmost()acceptsort_field(const int field index, default 0, or const string field name) so they can search arrays of user-defined types. The array must be sorted by the same field in ascending order. Interpret + compile object-mode, with dual-host parity tests. - Runtime
timeout_seconds: optional wall-clock circuit breaker on interpret (every 32 bars); partial results withtimed_out+error_kind=runtimefor edge/cron budgets (shared by Pro API and pyne-worker). linefill.newexport —DrawingRegistry.export_for_apiserializes line fills astype: "linefill"quads (line1 + line2 endpoints) so AXIS can paint the band.- Compile drawing set_ fold* —
fold_compile_drawing_mutationsappliesline.set_*/label.set_*/ … onto live handles and drops set events so compile/rundrawings match interpret final state. - Compile drawing
*.delete—line.delete/label.delete/box.delete/polyline.delete/table.deleteemitkind: 'delete'events on__drawings(target =*.newhandle);fold_compile_drawing_mutationsdrops deleted objects (was MVP no-op). force_overlayon export — line/box/label payloads includeforce_overlayfor AXIS pane routing.
Changed
- H1 dual-host: pyne-worker
pynescript_backendis a thin wrap over packagepynescript.runtime(strict OHLCV validation only); vendor via./scripts/sync_vendor.sh.
[0.3.5] - 2026-08-12
Fixed
- Drawing export (
line.new) —export_for_apino longer drops lines whosexloc.bar_indexis past the last bar (classicbar_index + 1onbarstate.islast). Extrapolates from series period; emptybar_timespasses bare bar index for AXIS logical mapping.
[0.3.4] - 2026-08-10
Added
- Package Runtime SoT (
pynescript.runtime): bar-loop host, series, CustomEvaluator live in the installable package;backend.*re-exports for Pro API. - First-party dual-host TA goldens (ATR / Supertrend / Keltner) and full
test_ta_incrementalCI gate. - Strategy exit surface: pending stop/limit + OCA;
from_entrymulti-leg (interpret + compile);qty_percent; minimal trail (interpret + compile); compile risk halt cascade (allow_entry_in,max_position_size,max_drawdown,max_cons_loss_days,max_intraday_loss,max_intraday_filled_orders); open/closed trade fields + MAE/MFE. request.securityhonesty + HTF resample: policy meta on Runtime; same-symbol coarser TF OHLCV bucketing; allowlisted simpleta.sma/ema/rsi/atron HTF.- Realtime host simulation:
realtime_last_bar/realtime_ticks/realtime_bars/realtime_from_barforvaripmulti-tick tests. - Free-tier Pro API guards (bar/script caps, rate, concurrency, SSRF-safe webhooks, chart/mock-only free data).
- Hash-only JSON API key store; first-party fixtures under
tests/fixtures/first_party/. - pine-worker series lookback polarity + parity smoke (
series[1]previous bar). - Plot host:
plot.style_*constants, style/linestyle capture, plotshape size export.
Fixed
- EMA dual-host seed (full-list SMA seed matches incremental/Numba).
ta.atrWilder RMA on interpret + Numba.- AugAssign / tuple unpack series binding; unparser
visit_Simple; linter C004/W002. - Enum/string series history so
d[1]works for plotshape flips. - vscode-extension transitive
brace-expansionDependabot high (2.1.4).
Changed
- CI Core runtime gates parity, strategy, series, TA incremental, first-party goldens, runtime package, free-limits.
- Docs:
docs/known_divergences.md, audit sprint status notes.
[0.3.3] - 2026-08-09
Fixed
- Corpus residual (C1, set01–04): dual-namespace user methods vs bare ta aliases
(
method dmi/float dmi = dmi(...)no longer mis-routes tota.dmiafter series assign);line.get_price/ line getters soft-na onnaline or endpoints and coerce PineSeries samples;request.securityOHLCVT +timelist unpack on different TF; sanitize dangling binary ops inside unclosed trailing calls (truncated docs scrapes). ta.dmisoft-na on unresolved /nalength (aligned with other TA period soft-na).
Changed
- Local open-source corpus set01–04 (2477 scripts, not shipped in git): parse 99.96%
(2476/2477) and Runtime interpret 100% excl. EXPECTED_FAIL (2466 OK + 11 intentional
demos); set01 Runtime 249/249. Harness classifies path-listed intentional demos
(library
runtime.error, lower-TF guards, pathological loops) as EXPECTED_FAIL. - Docs / landing: README, compatibility, roadmap, missing-features, and marketing numbers updated to the 2026-08-09 corpus snapshot (not TradingView® platform parity).
[0.3.2] - 2026-08-09
Changed
- Console scripts: preferred names are
pyneandpyne-lsp. Legacypynescript/pynescript-lspremain installed as aliases (same callables). Import package is stillpynescript; PyPI dist ishoox-pyne. Docs, VS Code auto-detect, and editor client configs preferpyne*with fallback topynescript*.
[0.3.1] - 2026-08-09
Added
- Strategy average-price models (pynescript extension):
strategy(..., avg_price_model=)"stock"(default) — multi-leg FIFO reweight ofposition_avg_priceon partial close (TV-like)"futures"— sticky net AEP until flat (linear USDT-M / BTCUSDT-style)"inverse"— accepted; sticky reduce (harmonic add deferred)- Tokens:
strategy.avg_price_stock/avg_price_futures/avg_price_inverse
- Leverage for futures UI (pynescript extension):
strategy(..., leverage=N)- Scales percent/cash default qty:
qty = margin × leverage / price - Margin held = notional / leverage; free cash adjusts accordingly
- Simple
strategy.margin_liquidation_pricewhen leverage > 1 - Derives TV-style
margin_long/margin_short% as100/leverage - Read-back:
strategy.leverage
- Scales percent/cash default qty:
- Dual-path wiring: interpret + compile broker + compiler emit for both options
- Docs: stock vs futures avg semantics; TV vs PYNE notes on
inputbeforestrategy()
Fixed
- Compile broker ctor no longer emits
name_arr[__bar_idx]for strategy kwargs (undefined at ctor time). Const-like input/literal defvals fold into ctor (e.g.lev = input.float(10)thenstrategy(..., leverage=lev)→leverage=10).
Changed
- Compile emit allowlist also wires
default_qty_type/default_qty_valueintoCompileStrategyBroker(...).
[0.3.0] - 2026-08-06
First public PYNE release. PyPI distribution name is hoox-pyne
(plain pyne / PyNE is taken by an unrelated package; import/CLIs remain
pynescript / pynescript-lsp). Install: pip install "hoox-pyne[lsp]".
Added
- Alert engine (
AlertsMixin): TV-stylealert.freq_*normalization, once-per-bar dedup, once-per-bar-close gating,alertconditionfire-on-true, host helpersexport_alerts/export_alerts_from_evaluator. - Dual-host alerts export: Pro API + pyne-worker
Runtimeclear/exportalerts(and optionalalert_conditions) on interpret/run. - L2 alert webhooks: Pro API
backend/alert_forwarder.py(webhook_url,ALERT_WEBHOOK_URL, last-bar filter, batch JSON); pyne-worker edge webhooks + cron last-bar delivery. Docs:docs/pyne/runtime/alerts.mdx. - Roadmap residual backlog IDs H1–L3 (dual-host, corpus tail, warm compile, series/TA, optional fidelity, long-horizon); see
docs/ROADMAP.md(2026-08-01). L2 closed (Pro API + edge). - Corpus C1 residual goldens: bare
tonumber,math.isfinite, strategyclosedtrades/opentradesentry_id/comment/max_drawdown/max_runup accessors; tests intests/test_corpus_runtime_residuals.py. - Interpret↔compile plot parity harness:
scripts/compare_interp_compile.py(multiprocess series compare with--file-list,--timeout-sec,--ignore-hline-keys,--ignore-fill-keys, and wave workers). - Parity tests:
tests/test_interp_compile_parity.py,tests/test_dividend_yield_parity.py, and R8/R9 kernel suites. - Compiler:
time_arron the compiled execute signature;numba_timestamp/numba_utc_parts; titledfill()series export;clear_numba_function_cacheswith corrupt-cache recovery. - Compile path for
numba_rci/ta.rci. - Strategy events system: StrategyEvent dataclass, full emission from strategy.* builtins, parity test corpus.
- pine-worker/ as colocated extra tool: TypeScript evaluator port + Python to TS converter script.
- var / varip declaration modes and ReAssign support.
- Multi-target Docker image (
api/api-dev/lsp),docker-bake.hcl, prod compose overlay, Makefile docker helpers. - Key-store backends selectable via
STORE_BACKEND(json|sqlite|redis) for multi-worker / multi-replica deploys. - PyPI publish workflow (Trusted Publishing on
v*tags) and package build job in CI. - Compiler disk IR/module cache (
PYNE_COMPILE_DISK_CACHE, default on) + typedCompileError*hierarchy +prewarm_numba_builtins(). - Runtime structured errors:
error_kind(parse|compile|runtime|data|order|mode),error_type,error_bar(API/runforwards).
Changed
- GitHub / package metadata for org
hoox-sh/pyne: project URLs, Docker image source label, docs, CONTRIBUTING, and PyPI Trusted Publisher owner. Seedocs/pyne/devops/publish-checklist.mdx. - PyPI distribution name is
hoox-pyne(import/CLIs remainpynescript/pynescript-lsp). Avoids collision with upstream elbakramerpynescriptand the unrelated pre-existingpyne/PyNEproject on PyPI. - Default image version labels / bake / Cloud Build substitution aligned to 0.3.0.
- Compile
request.securitypolicy: same-symbol simple OHLCV only; other foreign tickers and complex expressions resolve tona. - Disk IR meta version bumped when titled fill series export landed (and again for R8/R9 parity kernels).
- Interpret bar-loop residual wins (visit/Call arg plans, series last-sample, residual TA): ~1.24×
ta_combovs Round 5 (~137 ms @ 2k bars). - Compiler stays numeric for more history/math/chart surface; viewport right bar time is
(n_bars-1)*60000in compile mode. - Runtime
mode=auto: non-emptyinputsforces interpret with clear fallback reason; object-mode compile no longer requires Numba. - VS Code extension rebrand: PYNE — Pine Script™ for VS Code (
pyne0.3.0), HOOX logo icon, marketplace description as part of the HOOX open trading stack, TradingView® / Pine Script™ trademark disclaimer, and richer TextMate syntax highlighting. - VS Code extension packaging: esbuild-bundle
vscode-languageclientinto the VSIX, explicitonCommandactivation, resilient command handlers, and shared output channel. - CI rewritten for the post-AXIS-extract repo: Python lint/test matrix, package build, Docker smoke; removed dead
frontend/jobs. require_admin_tokenenforcesADMIN_TOKEN+X-Admin-Token(fail-closed); prod compose drops host source mounts viavolumes: !override.pyproject.tomlproject URLs, Alpha classifier, Python 3.13,proextra includesredis.- Updated documentation (ROADMAP, missing_features, implementation status, LSP plan, devops Docker) to reflect current state.
Fixed
- R8/R9 interpret↔compile corpus parity: foreign-na / MTF
request.security, Heikin-Ashi security, TA call-site slots, UDF series locals per Call site, series assign bar key(site, name), PineSeries snapshot for typed float/nz/array.set(BBI ring buffer),ta.vwap(hlc3[, anchor]),time(...)[1]call-expr history, strategyposition_size/avg/closedtrades[n]end-of-bar history, Pine==/!=withna(na==naTrue; other na compares False vianumba_pine_eq/ne). - Builtin kwargs merge no longer drops explicit trailing
None/ Pinena(e.g.array.push(id=a, value=na)), unblocking many corpus library scripts. - Corpus C1 8-agent residual pass:
str.replace4-arg/occurrence + coerce; richertimestampdate strings + TZ-first; series negative/na/OOB index →na; TA float/series periods; color hex/string channels;syminfo.prefix/tickerdual-mode; array get/set soft index +index_2d_to_1dstub polyfill;hour/dayofmonth/… series+timezone arity. - set05 6-agent pass:
timestamp(9999,…)year-first + calendar overflow;strategy.initial_capital =reassignment;timenow/dayofweek.*; sanitize keepstype == "SMA"ternary chains; v4random/offset/round_to_mintick+ticker.pointfigurefull arity; call-site cache stored on AST node (fixes id reuse collisions). - set05 residual round 2 (6 agents): bare TA series
obv/accdist/vwap;ta.linreglength<2→na;ta.kama2-arg; UDF name clobber restore; array.push soft arity +newcoloraliases; multi-island sanitize merge for UDF defs; missing UDF soft-na; int()/tonumber soft coerce; ticker.modifyadjustment=; kwargs merge + timestamp const-fold + static for-to. - Round 6 multi-agent pass (perf + correctness + error handling + compiler coverage).
- Compiler nopython kernels:
ta.dmi/ta.adx/ta.supertrend/ta.alma/ta.percentrank(match interpret oracle). - Incremental interpret TA for residual full-history paths:
mfi,sar,kc/kcw,alma,correlation, percentiles (behindPYNE_TA_INCREMENTAL). - Strategy exit commission and exit slippage on interpret + compile paths; bad order args emit events instead of silent fills.
- Stable
CRYPTO_KEY/METADATA_KEYresolution for Fernet metadata encryption (GitHub secrets wired). - User series no longer shadows bare builtins (
ad/tr/obv/pvt):plot(ad)emits the user series instead of re-emitting the Chaikin A/D stub. highestbars/lowestbarsuse negative TradingView®-style offsets (Aroon parity).- Compile Wilder RSI matches interpret (was a rolling SMA of gains).
- NaN-safe EMA/RMA seed for ATR custom
ma_functionand nested DEMA. - UDF last assign of
nano longer retains a prior tuple unpack (ADX early zeros). math.avgpropagatesna;ta.rocuses the standard formula;wmarequires a full non-nawindow;ta.cumtreatsna/ IEEE NaN as 0.request.security: foreign tickers and complex expressions resolve tonainstead of inventing chart close;dividend_yield/ CVI interpret↔compile parity.- Import stub plot cells are not serialized as color strings.
auto_fibinterpret and compile raise the same insufficient-pivot errors;for/toauto step;chart.pointobject dtype.- Interpreter:
ta.rising/ta.falling/ta.highestbars/ta.lowestbarsno longer raiseTypeErroron Pinena(e.g. VIDYA warmup on MA-STER). - Crossover equality aligned with TV/numba (
<=/>=on previous bar); short series rising/falling in bar mode. - Body
TypeErrorin call dispatch no longer soft-fails tona(signature mismatches still soft); strategystrategy()apply fails closed. - Compile object-mode:
array.sort/sort_indiceshonorsort_field;array.fillrange;map.keys/valuesnot coerced viasafe_float. - Corpus sanitize: multi-version islands, UI chrome, safer ternary/call/type-field repairs without FP on
?in input titles. - CI Ruff E,F,W gate: F821/
Anyimports and F401 unused imports cleaned for green CI on main.
Removed
- Stale
Dockerfile.api(folded into multi-targetDockerfile). - Dead
technical_refactored.pyand internal refactoring notes from the published package tree. - Broken AXIS-only GitHub workflows (
axis-nightly, PWA/e2e jobs) — AXIS CI lives in jango-blockchained/axis.